/**
 * Thawani Payment Gateway - Checkout Styles (Modern & Beautiful)
 *
 * @package ThawaniPaymentWoo
 */

/* Payment Method Styles */
.payment_method_thawani {
    border: 2px solid #e3e8ef;
    border-radius: 12px;
    margin: 15px 0;
    background: #ffffff;
    transition: all 0.3s ease;
    overflow: hidden;
}

.payment_method_thawani:hover {
    border-color: #0066cc;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.1);
    transform: translateY(-2px);
}

.payment_method_thawani label {
    display: flex;
    align-items: center;
    padding: 18px 20px;
    cursor: pointer;
    font-weight: 600;
    color: #1a1a1a;
    font-size: 16px;
    transition: background 0.3s ease;
}

.payment_method_thawani label:hover {
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
}

.payment_method_thawani input[type="radio"] {
    margin-right: 12px;
    width: 20px;
    height: 20px;
    cursor: pointer;
    accent-color: #0066cc;
}

.payment_method_thawani .thawani-logo {
    height: 28px;
    margin-left: 12px;
    vertical-align: middle;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.1));
}

/* Payment Box Content */
.payment_box.payment_method_thawani {
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    border-top: 2px solid #e3e8ef;
    padding: 25px;
    margin: 0;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.payment_box.payment_method_thawani > p:first-child {
    color: #2c3e50;
    font-size: 15px;
    line-height: 1.6;
    margin: 0 0 20px 0;
    padding: 15px;
    background: #ffffff;
    border-left: 4px solid #0066cc;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

/* Test Mode Notice */
.thawani-test-mode-notice {
    background: linear-gradient(135deg, #fff9e6 0%, #fffbf0 100%);
    border: 2px solid #ffd700;
    color: #856404;
    padding: 15px 20px;
    border-radius: 10px;
    margin: 0 0 20px 0;
    font-weight: 600;
    text-align: center;
    font-size: 14px;
    box-shadow: 0 3px 10px rgba(255, 215, 0, 0.2);
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 3px 10px rgba(255, 215, 0, 0.2);
    }
    50% {
        box-shadow: 0 3px 15px rgba(255, 215, 0, 0.4);
    }
}

.thawani-test-mode-notice::before {
    content: "🧪 ";
    font-size: 18px;
    margin-right: 8px;
}

/* Payment Information */
.thawani-payment-info {
    margin: 20px 0;
    padding: 20px;
    background: #ffffff;
    border-radius: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

.thawani-payment-info p {
    margin: 0 0 15px 0;
    color: #4a5568;
    font-size: 14px;
    line-height: 1.7;
    display: flex;
    align-items: center;
}

.thawani-payment-info p::before {
    content: "🔒";
    font-size: 18px;
    margin-right: 10px;
    flex-shrink: 0;
}

/* Accepted Cards */
.thawani-accepted-cards {
    text-align: center;
    margin: 20px 0 0 0;
    padding: 20px;
    background: linear-gradient(135deg, #f0f4ff 0%, #ffffff 100%);
    border-radius: 10px;
    border: 1px solid #e3e8ef;
}

.thawani-accepted-cards::before {
    content: "💳 Accepted Payment Methods";
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 15px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.thawani-accepted-cards img {
    max-width: 100%;
    height: auto;
    max-height: 45px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.thawani-accepted-cards img:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0,0,0,0.15);
}

/* Security Badges */
.thawani-security-badges {
    display: flex;
    justify-content: center;
    align-items: center;
    margin: 20px 0;
    gap: 20px;
    flex-wrap: wrap;
}

.thawani-security-badge {
    display: flex;
    align-items: center;
    padding: 10px 18px;
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8f4 100%);
    border: 2px solid #4caf50;
    border-radius: 25px;
    color: #2e7d32;
    font-size: 13px;
    font-weight: 600;
    box-shadow: 0 3px 8px rgba(76, 175, 80, 0.2);
    transition: all 0.3s ease;
}

.thawani-security-badge:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 12px rgba(76, 175, 80, 0.3);
}

.thawani-security-badge::before {
    content: "🔒";
    font-size: 16px;
    margin-right: 8px;
}

/* Payment Features */
.thawani-payment-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
    margin: 25px 0;
}

.thawani-feature {
    display: flex;
    align-items: center;
    padding: 15px;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9fa 100%);
    border: 2px solid #e3e8ef;
    border-radius: 10px;
    font-size: 14px;
    color: #2c3e50;
    font-weight: 500;
    transition: all 0.3s ease;
}

.thawani-feature:hover {
    border-color: #0066cc;
    transform: translateX(5px);
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.1);
}

.thawani-feature::before {
    content: "✓";
    color: #4caf50;
    font-weight: bold;
    margin-right: 12px;
    font-size: 18px;
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8f4 100%);
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Loading State */
.thawani-loading {
    text-align: center;
    padding: 25px;
    color: #4a5568;
    font-weight: 500;
    background: linear-gradient(135deg, #f8f9ff 0%, #ffffff 100%);
    border-radius: 10px;
    border: 2px solid #e3e8ef;
}

.thawani-loading::before {
    content: "";
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #e3e8ef;
    border-top: 3px solid #0066cc;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin-right: 12px;
    vertical-align: middle;
}

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

/* Error Messages */
.thawani-error {
    background: linear-gradient(135deg, #fee 0%, #fef5f5 100%);
    border: 2px solid #f5c6cb;
    color: #721c24;
    padding: 15px 20px;
    border-radius: 10px;
    margin: 15px 0;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 3px 10px rgba(220, 53, 69, 0.1);
    display: flex;
    align-items: center;
}

.thawani-error::before {
    content: "⚠️";
    font-size: 20px;
    margin-right: 12px;
    flex-shrink: 0;
}

/* Success Messages */
.thawani-success {
    background: linear-gradient(135deg, #e8f5e9 0%, #f1f8f4 100%);
    border: 2px solid #4caf50;
    color: #155724;
    padding: 15px 20px;
    border-radius: 10px;
    margin: 15px 0;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 3px 10px rgba(76, 175, 80, 0.1);
    display: flex;
    align-items: center;
}

.thawani-success::before {
    content: "✅";
    font-size: 20px;
    margin-right: 12px;
    flex-shrink: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .payment_method_thawani {
        border-radius: 10px;
        margin: 12px 0;
    }
    
    .payment_method_thawani label {
        padding: 15px;
        font-size: 15px;
    }
    
    .payment_box.payment_method_thawani {
        padding: 20px 15px;
    }
    
    .payment_box.payment_method_thawani > p:first-child {
        padding: 12px;
        font-size: 14px;
    }
    
    .thawani-payment-info {
        padding: 15px;
    }
    
    .thawani-payment-info p {
        font-size: 13px;
    }
    
    .thawani-payment-features {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .thawani-feature {
        padding: 12px;
        font-size: 13px;
    }
    
    .thawani-security-badges {
        flex-direction: column;
        gap: 12px;
    }
    
    .thawani-security-badge {
        width: 100%;
        justify-content: center;
    }
    
    .thawani-accepted-cards {
        padding: 15px;
    }
    
    .thawani-accepted-cards img {
        max-height: 40px;
    }
    
    .thawani-test-mode-notice {
        padding: 12px 15px;
        font-size: 13px;
    }
}

/* High Contrast Mode Support */
@media (prefers-contrast: high) {
    .payment_method_thawani {
        border-color: #000;
    }
    
    .thawani-test-mode-notice {
        background: #ffff00;
        color: #000;
        border-color: #000;
    }
    
    .thawani-feature {
        border-color: #000;
    }
}

/* Dark Mode Support */
@media (prefers-color-scheme: dark) {
    .payment_method_thawani {
        background: linear-gradient(135deg, #2c2c2c 0%, #1a1a1a 100%);
        border-color: #444;
        color: #fff;
    }
    
    .payment_method_thawani:hover {
        border-color: #4d94ff;
        box-shadow: 0 4px 12px rgba(77, 148, 255, 0.2);
    }
    
    .payment_method_thawani label {
        color: #fff;
    }
    
    .payment_method_thawani label:hover {
        background: linear-gradient(135deg, #333 0%, #2c2c2c 100%);
    }
    
    .payment_box.payment_method_thawani {
        background: linear-gradient(135deg, #2a2a2a 0%, #1f1f1f 100%);
        border-top-color: #444;
        color: #e0e0e0;
    }
    
    .payment_box.payment_method_thawani > p:first-child {
        background: #2c2c2c;
        color: #e0e0e0;
        border-left-color: #4d94ff;
    }
    
    .thawani-payment-info {
        background: #2c2c2c;
    }
    
    .thawani-payment-info p {
        color: #b0b0b0;
    }
    
    .thawani-accepted-cards {
        background: linear-gradient(135deg, #2a2a2a 0%, #1f1f1f 100%);
        border-color: #444;
    }
    
    .thawani-accepted-cards::before {
        color: #b0b0b0;
    }
    
    .thawani-feature {
        background: linear-gradient(135deg, #2c2c2c 0%, #252525 100%);
        border-color: #444;
        color: #e0e0e0;
    }
    
    .thawani-feature:hover {
        border-color: #4d94ff;
        box-shadow: 0 4px 12px rgba(77, 148, 255, 0.2);
    }
    
    .thawani-loading {
        background: linear-gradient(135deg, #2a2a2a 0%, #1f1f1f 100%);
        border-color: #444;
        color: #b0b0b0;
    }
    
    .thawani-loading::before {
        border-color: #444;
        border-top-color: #4d94ff;
    }
}

/* Selected State */
.payment_method_thawani input[type="radio"]:checked ~ label,
li.payment_method_thawani.wc_payment_method input[type="radio"]:checked ~ label {
    background: linear-gradient(135deg, #e6f2ff 0%, #f0f7ff 100%);
    border-radius: 8px;
}

li.payment_method_thawani.wc_payment_method input[type="radio"]:checked ~ .payment_box {
    border-top-color: #0066cc;
}

/* Focus States for Accessibility */
.payment_method_thawani input[type="radio"]:focus {
    outline: 2px solid #0066cc;
    outline-offset: 2px;
}

.payment_method_thawani label:focus-within {
    box-shadow: 0 0 0 3px rgba(0, 102, 204, 0.2);
}

/* Smooth Transitions */
* {
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
}

/* Additional Visual Enhancements */
.payment_box.payment_method_thawani::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, #0066cc 0%, #4d94ff 100%);
    border-radius: 10px 10px 0 0;
}

.payment_box.payment_method_thawani {
    position: relative;
}

/* Trust Indicators */
.thawani-trust-indicators {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 15px;
    margin: 20px 0 10px 0;
    padding: 15px;
    background: linear-gradient(135deg, #f0f9ff 0%, #ffffff 100%);
    border-radius: 10px;
    border: 1px solid #e3e8ef;
}

.thawani-trust-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 11px;
    color: #4a5568;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.thawani-trust-indicator::before {
    font-size: 24px;
    margin-bottom: 5px;
}

.thawani-trust-indicator.secure::before {
    content: "🔒";
}

.thawani-trust-indicator.fast::before {
    content: "⚡";
}

.thawani-trust-indicator.verified::before {
    content: "✓";
    background: linear-gradient(135deg, #4caf50 0%, #66bb6a 100%);
    color: white;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: bold;
}

/* Partial Payment Styles */
.thawani-partial-payment-info {
    background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 100%);
    border: 2px solid #0066cc;
    border-radius: 12px;
    padding: 25px;
    margin: 20px 0;
    box-shadow: 0 4px 15px rgba(0, 102, 204, 0.1);
}

.thawani-partial-payment-info h3 {
    color: #0066cc;
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 15px 0;
    padding-bottom: 12px;
    border-bottom: 2px solid #e3e8ef;
    display: flex;
    align-items: center;
}

.thawani-partial-payment-info h3::before {
    content: "💳";
    font-size: 24px;
    margin-right: 10px;
}

.thawani-partial-payment-info p {
    color: #4a5568;
    font-size: 15px;
    line-height: 1.7;
    margin: 10px 0;
}

.thawani-partial-payment-info p strong {
    color: #2c3e50;
    font-weight: 600;
}

.thawani-payment-breakdown {
    width: 100%;
    margin: 20px 0 0 0;
    border-collapse: separate;
    border-spacing: 0;
    background: #ffffff;
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}

.thawani-payment-breakdown tr {
    border-bottom: 1px solid #e3e8ef;
}

.thawani-payment-breakdown tr:last-child {
    border-bottom: none;
}

.thawani-payment-breakdown td {
    padding: 15px 20px;
    font-size: 15px;
}

.thawani-payment-breakdown td:first-child {
    color: #4a5568;
    font-weight: 500;
    width: 60%;
}

.thawani-payment-breakdown td:last-child {
    color: #0066cc;
    font-weight: 700;
    text-align: right;
    font-size: 16px;
}

.thawani-payment-breakdown tr:last-child td {
    background: linear-gradient(135deg, #f0f7ff 0%, #ffffff 100%);
    font-size: 17px;
}

.thawani-payment-breakdown tr:last-child td:last-child {
    color: #4caf50;
}

/* Child Order Payment Button */
.woocommerce-order-pay .button.alt {
    background: linear-gradient(135deg, #0066cc 0%, #0052a3 100%);
    color: white;
    border: none;
    padding: 15px 35px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 102, 204, 0.3);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.woocommerce-order-pay .button.alt:hover {
    background: linear-gradient(135deg, #0052a3 0%, #003d7a 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 102, 204, 0.4);
}

.woocommerce-order-pay .button.alt:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 102, 204, 0.3);
}

/* Responsive Partial Payment Styles */
@media (max-width: 768px) {
    .thawani-partial-payment-info {
        padding: 20px 15px;
        margin: 15px 0;
    }
    
    .thawani-partial-payment-info h3 {
        font-size: 16px;
    }
    
    .thawani-partial-payment-info p {
        font-size: 14px;
    }
    
    .thawani-payment-breakdown td {
        padding: 12px 15px;
        font-size: 14px;
    }
    
    .thawani-payment-breakdown td:first-child {
        width: 55%;
    }
    
    .thawani-payment-breakdown td:last-child {
        font-size: 15px;
    }
    
    .woocommerce-order-pay .button.alt {
        width: 100%;
        padding: 15px 20px;
        font-size: 15px;
    }
}

/* Print Styles */
@media print {
    .payment_method_thawani,
    .thawani-payment-info,
    .thawani-accepted-cards,
    .thawani-partial-payment-info {
        background: white !important;
        color: black !important;
        border: 1px solid black !important;
    }
    
    .thawani-test-mode-notice {
        background: white !important;
        color: black !important;
        border: 2px solid black !important;
    }
    
    .payment_method_thawani:hover,
    .thawani-feature:hover,
    .thawani-accepted-cards img:hover {
        transform: none !important;
        box-shadow: none !important;
    }
    
    .thawani-payment-breakdown {
        border: 1px solid black !important;
    }
}