/* SS WooCommerce Gift Cards - Public Styles */

.gift-card-form {
    margin: 20px 0;
}

.gift-card-options {
    margin: 20px 0;
}

.gift-card-section {
    margin-bottom: 30px;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 5px;
}

.gift-card-section h4 {
    margin-top: 0;
    margin-bottom: 15px;
    font-size: 18px;
    color: #333;
}

.gift-card-section p {
    margin-bottom: 15px;
}

.gift-card-section label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.gift-card-section .input-text,
.gift-card-section textarea {
    width: 100%;
    max-width: 400px;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
}

.gift-card-section .input-text:focus,
.gift-card-section textarea:focus {
    border-color: #0066cc;
    outline: none;
    box-shadow: 0 0 0 2px rgba(0, 102, 204, 0.1);
}

.gift-card-section small {
    display: block;
    margin-top: 5px;
    color: #666;
    font-size: 12px;
}

/* Predefined amounts */
.gift-card-predefined-amounts {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 15px;
}

.gift-card-amount-option {
    position: relative;
    margin: 0;
    cursor: pointer;
    display: inline-block;
}

.gift-card-amount-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.gift-card-amount-option span {
    display: inline-block;
    padding: 12px 24px;
    background: #fff;
    border: 2px solid #ddd;
    border-radius: 5px;
    transition: all 0.3s ease;
    font-weight: 600;
    font-size: 16px;
    min-width: 80px;
    text-align: center;
}

.gift-card-amount-option input[type="radio"]:checked + span {
    background: #0066cc;
    border-color: #0066cc;
    color: #fff;
}

.gift-card-amount-option:hover span {
    border-color: #0066cc;
}

.gift-card-amount-option input[type="radio"]:focus + span {
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.25);
}

/* Custom amount */
.gift-card-custom-amount {
    margin-top: 15px;
    padding: 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.gift-card-custom-amount label {
    font-weight: 600;
    margin-bottom: 10px;
}

.gift-card-custom-amount input[type="number"] {
    width: 100%;
    max-width: 200px;
    padding: 12px;
    font-size: 18px;
    font-weight: 600;
    border: 2px solid #ddd;
    border-radius: 5px;
}

.gift-card-custom-amount input[type="number"]:focus {
    border-color: #0066cc;
    outline: none;
}

/* Background selector */
.gift-card-background-selector {
    margin-top: 10px;
}

.background-options {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.background-option {
    position: relative;
    margin: 0;
    cursor: pointer;
    display: inline-block;
}

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

.background-preview {
    display: block;
    width: 100px;
    height: 70px;
    border: 3px solid #ddd;
    border-radius: 5px;
    background-size: cover;
    background-position: center;
    transition: all 0.3s ease;
}

.background-preview.default {
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    color: #666;
}

.background-option input[type="radio"]:checked + .background-preview {
    border-color: #0066cc;
    box-shadow: 0 0 10px rgba(0, 102, 204, 0.3);
}

.background-option:hover .background-preview {
    border-color: #999;
}

/* Add to cart button for gift card form */
/* Remove hardcoded styles to allow WordPress theme styling to take precedence */
.gift-card-form .single_add_to_cart_button {
    margin-top: 20px;
}

.gift-card-form .single_add_to_cart_button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Checkout gift card form */
.ss-wgc-checkout-form-wrapper {
    margin: 20px 0 30px 0;
}

.ss-wgc-checkout-form {
    margin: 20px 0;
    padding: 25px;
    background: #f0f7ff;
    border: 2px solid #0066cc;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.1);
}

.ss-wgc-checkout-form h3 {
    margin-top: 0;
    margin-bottom: 10px;
    color: #0066cc;
    font-size: 1.2em;
    font-weight: 600;
}

.ss-wgc-checkout-form .ss-wgc-description {
    margin-bottom: 15px;
    color: #555;
    font-size: 0.95em;
}

.ss-wgc-form-wrapper {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
}

.ss-wgc-form-wrapper input[type="text"] {
    flex: 1;
    max-width: 300px;
    padding: 12px 15px;
    border: 2px solid #ddd;
    border-radius: 4px;
    font-size: 14px;
    transition: border-color 0.3s;
}

.ss-wgc-form-wrapper input[type="text"]:focus {
    border-color: #0066cc;
    outline: none;
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.1);
}

.ss-wgc-form-wrapper .button {
    padding: 12px 24px;
    background: #0066cc;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 14px;
    transition: background-color 0.3s, transform 0.1s;
    white-space: nowrap;
}

.ss-wgc-form-wrapper .button:hover {
    background: #0052a3;
    transform: translateY(-1px);
}

.ss-wgc-form-wrapper .button:active {
    transform: translateY(0);
}

.ss-wgc-form-wrapper .button:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
}

.ss-wgc-message {
    margin: 10px 0;
    padding: 10px;
    border-radius: 3px;
}

.ss-wgc-message:empty {
    display: none;
}

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

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

.ss-wgc-applied-cards {
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.ss-wgc-applied-cards h4 {
    margin-bottom: 10px;
    font-size: 14px;
}

.ss-wgc-applied-card {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px;
    margin-bottom: 5px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 3px;
}

.ss-wgc-applied-card .code {
    font-weight: 600;
    font-family: monospace;
    flex: 1;
}

.ss-wgc-applied-card .balance {
    color: #0066cc;
    font-weight: 600;
}

.ss-wgc-remove-btn {
    padding: 2px 8px;
    background: #dc3545;
    color: #fff;
    border: none;
    border-radius: 3px;
    cursor: pointer;
    font-size: 18px;
    line-height: 1;
}

.ss-wgc-remove-btn:hover {
    background: #c82333;
}

/* Balance check */
.ss-wgc-balance-check {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 5px;
}

.ss-wgc-balance-result {
    margin-top: 15px;
}

.ss-wgc-balance-info {
    padding: 15px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 5px;
}

.ss-wgc-balance-info p {
    margin: 5px 0;
}

.ss-wgc-balance-info .balance-amount {
    font-size: 24px;
    font-weight: 600;
    color: #0066cc;
}

/* Redeem form */
.ss-wgc-redeem-form {
    padding: 20px;
    background: #f9f9f9;
    border-radius: 5px;
}

.ss-wgc-redeem-result {
    margin-top: 15px;
}

/* Responsive */
@media (max-width: 768px) {
    .gift-card-section .input-text,
    .gift-card-section textarea {
        max-width: 100%;
    }

    .ss-wgc-form-wrapper {
        flex-direction: column;
    }

    .ss-wgc-form-wrapper input[type="text"] {
        max-width: 100%;
    }

    .gift-card-predefined-amounts {
        justify-content: center;
    }
    
    .gift-card-amount-option span {
        padding: 10px 18px;
        font-size: 14px;
        min-width: 70px;
    }
}
