/**
 * Abstract Gift Cards - Public Styles
 * 
 * @package AbstractGiftCards
 * @copyright 2025 KramitLabs
 * @license GPL-2.0-or-later
 */

.agc-balance-checker {
    margin: 20px 0;
}

#wc-gift_card-form {
    padding: 15px;
    background: #f9f9f9;
    border-radius: 4px;
}

#gift-card-balance-check {
    margin-top: 10px;
    padding: 10px;
    border-radius: 4px;
}

#gift-card-balance-check.valid {
    background: #d4edda;
    color: #155724;
}

#gift-card-balance-check.invalid {
    background: #f8d7da;
    color: #721c24;
}

/* Gift card gifting styles */
.agc-cart-gifting {
    display: block !important;
    width: 100%;
}

.agc-gift-toggle {
    margin-top: 10px;
    display: block !important;
}

.agc-gift-toggle label {
    display: flex !important;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
}

.agc-gift-checkbox {
    display: inline-block !important;
    width: auto !important;
    height: auto !important;
    margin: 0 8px 0 0 !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: static !important;
}

.agc-gift-fields {
    margin-top: 15px;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.agc-gift-fields input,
.agc-gift-fields textarea {
    width: 100%;
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    box-sizing: border-box;
}

.agc-gift-fields input:disabled,
.agc-gift-fields textarea:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
}

/* Campaign bonus message styling */
.agc-campaign-bonus {
    display: flex;
    align-items: center;
    gap: 10px;
}

.agc-bonus-message {
    color: #2e7d32;
    font-weight: 600;
    font-size: 14px;
    padding: 4px 8px;
    background: #e8f5e9;
    border-radius: 4px;
    border: 1px solid #c8e6c9;
}

/* Enhanced gift toggle styling for cart and checkout */
.agc-gift-toggle,
.agc-checkout-gift-item > div:first-of-type {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 12px 15px;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}

.agc-gift-toggle:hover,
.agc-checkout-gift-item > div:first-of-type:hover {
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
    transform: translateY(-1px);
}

.agc-gift-toggle label,
.agc-checkout-gift-item label {
    color: #ffffff !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    margin: 0 !important;
}

/* Checkout gifting specific styles */
.agc-checkout-gifting {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border: 2px solid #667eea;
    border-radius: 8px;
}

.agc-checkout-gifting h3 {
    margin-top: 0;
    color: #667eea;
    display: flex;
    align-items: center;
    gap: 10px;
}

.agc-checkout-gift-item {
    margin-bottom: 25px;
    padding: 15px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #ddd;
}

.agc-checkout-gift-fields {
    padding-top: 15px;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .agc-gift-toggle label,
    .agc-checkout-gift-item label {
        font-size: 14px !important;
    }
    
    .agc-checkout-gifting {
        padding: 15px;
    }
}

/* Template Selection System */
.agc-occasion-selector {
    margin: 15px 0;
}

.agc-occasion-selector label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.agc-occasion-select {
    width: 100%;
    padding: 10px;
    border: 2px solid #ddd;
    border-radius: 6px;
    font-size: 14px;
    background: #fff;
    cursor: pointer;
    transition: border-color 0.2s ease;
}

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

.agc-template-selector {
    margin: 20px 0;
    padding: 20px;
    background: #f9f9f9;
    border-radius: 8px;
    border: 2px solid #667eea;
}

.agc-template-loading {
    text-align: center;
    padding: 40px 20px;
}

.agc-template-loading-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 15px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    animation: agc-spin 1s linear infinite;
}

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

.agc-template-loading p {
    color: #666;
    font-size: 14px;
}

.agc-template-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-top: 15px;
}

.agc-template-card {
    position: relative;
    overflow: hidden;
}

.agc-template-card.selected::after {
    content: '✓';
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: #2271b1;
    color: #fff;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    font-weight: bold;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

/* Responsive template grid */
@media (max-width: 600px) {
    .agc-template-grid {
        grid-template-columns: 1fr;
    }
}

@media (min-width: 900px) {
    .agc-template-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}
