/* WC Gift Cards - Frontend Styles */

/* Gift Card Form */
.wcgc-gift-card-form {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 25px;
    margin: 20px 0;
}

.wcgc-gift-card-form h3 {
    margin: 0 0 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #e9ecef;
    font-size: 1.3em;
}

/* Amount Selection */
.wcgc-amounts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 15px 0;
}

.wcgc-amount-option {
    position: relative;
}

.wcgc-amount-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
}

.wcgc-amount-option .wcgc-amount-label {
    display: inline-block;
    padding: 12px 24px;
    border: 2px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 1.1em;
    transition: all 0.2s ease;
    background: #fff;
}

.wcgc-amount-option input[type="radio"]:checked + .wcgc-amount-label {
    border-color: #2271b1;
    background: #2271b1;
    color: #fff;
}

.wcgc-amount-option .wcgc-amount-label:hover {
    border-color: #2271b1;
}

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

.wcgc-custom-amount-input input {
    width: 150px;
    padding: 10px;
    font-size: 1.1em;
    border: 2px solid #ddd;
    border-radius: 6px;
}

.wcgc-amount-hint {
    color: #666;
    font-size: 0.9em;
    margin-left: 10px;
}

/* Template Selection */
.wcgc-templates {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 12px;
    margin: 15px 0;
}

.wcgc-template-option {
    position: relative;
}

.wcgc-template-option input[type="radio"] {
    position: absolute;
    opacity: 0;
}

.wcgc-template-option img {
    width: 100%;
    height: 80px;
    object-fit: cover;
    border-radius: 8px;
    border: 3px solid transparent;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wcgc-template-option input[type="radio"]:checked + img {
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34, 113, 177, 0.3);
}

.wcgc-template-option img:hover {
    border-color: #ccc;
}

.wcgc-template-name {
    display: block;
    padding: 5px;
    text-align: center;
    font-size: 0.85em;
}

/* Form Fields */
.wcgc-field {
    margin: 20px 0;
}

.wcgc-field label {
    display: block;
    font-weight: 500;
    margin-bottom: 8px;
}

.wcgc-field label .required {
    color: #d63638;
}

.wcgc-field input,
.wcgc-field textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
}

.wcgc-field input:focus,
.wcgc-field textarea:focus {
    border-color: #2271b1;
    outline: none;
}

.wcgc-field textarea {
    resize: vertical;
    min-height: 80px;
}

/* Checkout Redeem Section */
.wcgc-checkout-redeem {
    background: #f0f7fb;
    border: 1px solid #c8e0ed;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
}

.wcgc-toggle-link {
    color: #2271b1;
    text-decoration: none;
    font-weight: 500;
}

.wcgc-toggle-icon {
    margin-right: 8px;
}

.wcgc-redeem-form {
    margin-top: 15px;
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    align-items: center;
}

.wcgc-redeem-form input[type="text"] {
    flex: 1;
    min-width: 200px;
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 1em;
}

.wcgc-redeem-form button {
    padding: 10px 20px;
    background: #2271b1;
    color: #fff;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
}

.wcgc-redeem-form button:hover {
    background: #135e96;
}

/* Applied Gift Card Notice */
.wcgc-applied-notice {
    display: flex;
    align-items: center;
    gap: 15px;
    background: #d4edda;
    padding: 12px 15px;
    border-radius: 6px;
}

.wcgc-applied-icon {
    font-size: 1.5em;
}

.wcgc-applied-text {
    flex: 1;
}

.wcgc-remove-applied {
    background: none;
    border: 1px solid #721c24;
    color: #721c24;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9em;
}

.wcgc-remove-applied:hover {
    background: #721c24;
    color: #fff;
}

/* Messages */
.wcgc-code-message,
.wcgc-redeem-message {
    margin-top: 10px;
    padding: 10px 15px;
    border-radius: 6px;
    width: 100%;
}

.wcgc-code-message.error,
.wcgc-redeem-message.error {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

.wcgc-code-message.success,
.wcgc-redeem-message.success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

/* Cart Item Data */
.wcgc-cart-data {
    font-size: 0.9em;
    color: #666;
    margin-top: 10px;
}

.wcgc-cart-data dt {
    font-weight: 600;
    display: inline;
}

.wcgc-cart-data dd {
    display: inline;
    margin: 0 15px 0 5px;
}

/* Image Preview */
.wcgc-image-preview img {
    max-width: 150px;
    border-radius: 8px;
    margin-top: 10px;
}

/* Upload placeholder */
.wcgc-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    height: 80px;
    background: #f0f0f0;
    border: 2px dashed #ccc;
    border-radius: 8px;
    cursor: pointer;
}

.wcgc-upload-icon {
    font-size: 1.5em;
    margin-bottom: 5px;
}

/* Responsive */
@media (max-width: 600px) {
    .wcgc-amounts {
        flex-direction: column;
    }
    
    .wcgc-amount-option .wcgc-amount-label {
        display: block;
        text-align: center;
    }
    
    .wcgc-templates {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .wcgc-redeem-form {
        flex-direction: column;
    }
    
    .wcgc-redeem-form input[type="text"] {
        width: 100%;
    }
}
