/**
 * eSIM Add-to-Cart Shortcode Styles
 */

.esim-atc-wrapper {
    margin: 15px 0;
    font-family: inherit;
}

/* Toggle Button */
.esim-atc-toggle {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 14px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s, box-shadow 0.2s;
}

.esim-atc-toggle:hover {
    opacity: 0.92;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
}

.esim-atc-open .esim-atc-toggle {
    border-radius: 8px 8px 0 0;
}

.esim-atc-toggle-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    font-size: 18px;
    line-height: 1;
}

/* Panel */
.esim-atc-panel {
    padding: 20px;
    background: #f8f9fa;
    border: 1px solid #e0e0e0;
    border-top: none;
    border-radius: 0 0 8px 8px;
}

/* Fields */
.esim-atc-field {
    margin-bottom: 16px;
}

.esim-atc-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 14px;
    color: #333;
}

.esim-atc-country {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 15px;
    background: #fff;
}

.esim-atc-country:focus {
    border-color: #667eea;
    outline: none;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

/* Package cards */
.esim-atc-packages {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 10px;
}

.esim-atc-pkg-option {
    position: relative;
    cursor: pointer;
}

.esim-atc-pkg-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.esim-atc-pkg-label {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 14px 10px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 8px;
    text-align: center;
    transition: border-color 0.2s, background 0.2s;
}

.esim-atc-pkg-option input[type="radio"]:checked + .esim-atc-pkg-label {
    border-color: #667eea;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.06) 0%, rgba(118, 75, 162, 0.06) 100%);
}

.esim-atc-pkg-option:hover .esim-atc-pkg-label {
    border-color: #667eea;
}

.esim-atc-pkg-label strong {
    font-size: 20px;
    color: #333;
    margin-bottom: 4px;
}

.esim-atc-pkg-validity {
    font-size: 12px;
    color: #888;
    margin-bottom: 4px;
}

.esim-atc-pkg-price {
    font-size: 15px;
    font-weight: 600;
    color: #667eea;
}

/* Hints / loading */
.esim-atc-hint {
    text-align: center;
    padding: 16px;
    color: #888;
    font-style: italic;
    grid-column: 1 / -1;
    margin: 0;
}

.esim-atc-hint.esim-atc-error {
    color: #dc3545;
}

/* Price row */
.esim-atc-price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    margin-bottom: 16px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 8px;
    color: #fff;
}

.esim-atc-price-label {
    font-size: 14px;
    opacity: 0.9;
}

.esim-atc-price-value {
    font-size: 20px;
    font-weight: 700;
}

/* Submit button */
.esim-atc-submit {
    display: block;
    width: 100%;
    padding: 14px;
    background: #333;
    color: #fff;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s, opacity 0.2s;
}

.esim-atc-submit:hover:not(:disabled) {
    background: #555;
}

.esim-atc-submit:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Status messages */
.esim-atc-message {
    margin-top: 12px;
    padding: 10px 14px;
    border-radius: 6px;
    font-size: 14px;
    text-align: center;
}

.esim-atc-message.esim-atc-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.esim-atc-message.esim-atc-error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Responsive */
@media (max-width: 480px) {
    .esim-atc-packages {
        grid-template-columns: repeat(2, 1fr);
    }

    .esim-atc-pkg-label strong {
        font-size: 17px;
    }
}
