/**
 * WooCommerce Gift Cards - Frontend Styles
 */

.wcgc-gift-card-options {
    margin: 20px 0;
    padding: 25px;
    border-radius: 8px;
}

.wcgc-gift-card-options h4 {
    margin: 0 0 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #dee2e6;
    font-size: 18px;
    color: #333;
}

.wcgc-gift-card-options h5 {
    margin: 20px 0 15px;
    font-size: 16px;
    color: #444;
}

.wcgc-gift-card-options .required {
    color: #dc3545;
}

/* Amount selection */
.wcgc-amount-selection {
    margin-bottom: 20px;
}

.wcgc-amount-selection > label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: #333;
}

.wcgc-amount-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.wcgc-amount-btn {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border: 2px solid #ddd;
    border-radius: 6px;
    background: #fff;
    color: #333;
    cursor: pointer;
    transition: all 0.3s ease;
    min-width: 80px;
    margin-inline-start: 0 !important;
}

.wcgc-amount-btn:hover {
    border-color: #00007e;
    color: #00007e;
}

.wcgc-amount-btn.active {
    background-color: #00007e !important;
    border-color: #00007e;
    color: #fff;
}

.wcgc-amount-btn.wcgc-custom-btn {
    border-color: transparent;
    color: #fff;
}

.wcgc-amount-btn.wcgc-custom-btn:hover,
.wcgc-amount-btn.wcgc-custom-btn.active {

}

/* Custom amount input */
.wcgc-custom-amount {
    margin-top: 15px;
    margin-bottom: 15px;
    padding: 15px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

.wcgc-custom-amount label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
}

.wcgc-custom-amount input {
    width: 100%;
    max-width: 200px;
    padding: 10px 15px;
    font-size: 16px;
    border: 2px solid #ddd;
    border-radius: 6px;
    transition: border-color 0.3s ease;
}

.wcgc-custom-amount input:focus {
    outline: none;
    border-color: #007bff;
}

.wcgc-custom-amount .wcgc-amount-range {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: #666;
}

/* Design selection */
.wcgc-design-selection {
    margin-bottom: 20px;
}

.wcgc-design-selection > label {
    display: block;
    margin-bottom: 12px;
    font-weight: 600;
    color: #333;
}

.wcgc-design-options {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.wcgc-design-option {
    cursor: pointer;
}

.wcgc-design-option input[type="radio"] {
    display: none;
}

.wcgc-design-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: 120px;
    height: 75px;
    border-radius: 8px;
    border: 3px solid transparent;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    position: relative;
    overflow: hidden;
}

.wcgc-design-option input[type="radio"]:checked + .wcgc-design-card {
    border-color: #00007e;
    box-shadow: 0 4px 12px rgba(40,167,69,0.3);
    transform: scale(1.05);
}

.wcgc-design-option input[type="radio"]:checked + .wcgc-design-card::after {
    content: '✓';
    position: absolute;
    top: 5px;
    right: 5px;
    width: 20px;
    height: 20px;
    background: #00007e;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: bold;
}

.wcgc-design-name {
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-shadow: 0 1px 3px rgba(0,0,0,0.4);
}

/* Recipient information */
.wcgc-recipient-info {
    margin-top: 25px;
    padding-top: 20px;
    border-top: 1px solid #dee2e6;
}

.wcgc-recipient-info .form-row {
    margin-bottom: 15px;
}

.wcgc-recipient-info label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.wcgc-recipient-info .input-text {
    width: 100%;
    padding: 10px 15px;
    font-size: 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    transition: border-color 0.3s ease;
}

.wcgc-recipient-info .input-text:focus {
    outline: none;
    border-color: #00007e;
}

.wcgc-recipient-info textarea.input-text {
    min-height: 80px;
    resize: vertical;
}

.wcgc-recipient-info .description {
    display: block;
    margin-top: 6px;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

/* Cart display */
.woocommerce-cart .wcgc-cart-item-data dt {
    font-weight: 600;
    color: #333;
}

.woocommerce-cart .wcgc-cart-item-data dd {
    margin: 0 0 10px;
    padding-left: 0;
}

/* Responsive styles */
@media screen and (max-width: 768px) {
    .wcgc-gift-card-options {
        padding: 15px;
    }
    
    .wcgc-amount-buttons {
        flex-direction: column;
    }
    
    .wcgc-amount-btn {
        width: 100%;
        text-align: center;
    }
    
    .wcgc-design-options {
        justify-content: center;
    }
    
    .wcgc-design-card {
        width: 100px;
        height: 65px;
    }
}

/* Animation for selected state */
@keyframes selectPulse {
    0% { transform: scale(1.05); }
    50% { transform: scale(1.08); }
    100% { transform: scale(1.05); }
}

.wcgc-amount-btn.active {
    animation: selectPulse 0.3s ease-out;
}

/* Error state */
.wcgc-gift-card-options .error-message {
    color: #dc3545;
    font-size: 13px;
    margin-top: 5px;
}

.wcgc-gift-card-options .has-error input,
.wcgc-gift-card-options .has-error textarea {
    border-color: #dc3545;
}

/* Loading state */
.wcgc-loading {
    opacity: 0.6;
    pointer-events: none;
}

.wcgc-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 30px;
    height: 30px;
    margin: -15px 0 0 -15px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #00007e;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.woocommerce-price-suffix {
    margin-left: 10px;
    font-size: 15px;
    color: #333;
}

.price {
    display: none;
}