/**
 * Xendit Payment Gateway Styles
 */

/* Payment Form Styles */
.xendit-payment-form {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.xendit-payment-form .card {
    border-radius: 6px;
    border: 2px solid #e1e5e9;
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.xendit-payment-form .card .card-header,
.xendit-payment-form .card-header {
    background: #316061;
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    padding: 10px 15px;
    margin: 0;
    border: none;
    border-radius: 0;
    border-bottom: 1px solid #e1e5e9;
}

.xendit-payment-form fieldset {
    margin: 0;
    border: 2px solid #e1e5e9;
    border-radius: 0;
    background: #ffffff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.xendit-payment-form legend {
    background: #142424;
    color: #ffffff;
    font-size: 18px;
    font-weight: 600;
    padding: 10px 15px;
    margin-left: 0;
    border: none;
    border-radius: 0;
}

.payment-details {
    padding: 0;
}

.form-group {
    margin-bottom: 25px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-group label {
    color: #374151;
    font-size: 14px;
    font-weight: 500;
    margin-bottom: 8px;
}

.amount-display {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    font-size: 28px;
    font-weight: 700;
    text-align: center;
    border-radius: 0;
    box-shadow: 0 4px 6px rgba(16, 185, 129, 0.2);
}

/* Payment Methods Grid */
.payment-methods {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

.method-option label {
    padding: 20px 10px;
    border: 2px solid #e5e7eb;
    border-radius: 0;
    background: #ffffff;
    transition: all 0.2s ease-in-out;
    font-weight: 500;
    font-size: 14px;
    min-height: 80px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

.method-option label:hover {
    border-color: #3b82f6;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.15);
    transform: translateY(-1px);
}

.method-option input[type="radio"]:checked + label {
    border-color: #3b82f6;
    background: #eff6ff;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.payment-logo {
    height: 24px;
    width: auto;
    margin-bottom: 8px;
    filter: grayscale(50%);
    transition: filter 0.2s ease;
}

.method-option input[type="radio"]:checked + label .payment-logo {
    filter: grayscale(0%);
}

/* Membership Benefits */
.membership-benefits {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 0;
    list-style: none;
    padding: 20px;
    margin: 0;
}

.membership-benefits li {
    position: relative;
    padding-left: 25px;
    margin-bottom: 8px;
    color: #475569;
    font-size: 14px;
}

.membership-benefits li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #10b981;
    font-weight: bold;
}

/* Form Actions */
.form-actions {
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

.btn {
    font-weight: 600;
    text-align: center;
    vertical-align: middle;
    user-select: none;
    border: 1px solid transparent;
    line-height: 1.5;
    border-radius: 0;
    transition: all 0.15s ease-in-out;
    text-decoration: none;
    cursor: pointer;
    font-family: inherit;
}

.btn:focus {
    outline: 0;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    border-color: #2563eb;
    color: #ffffff;
    font-size: 16px;
    padding: 12px 32px;
    min-width: 200px;
}

.btn-primary:hover:not(:disabled) {
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    border-color: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 6px rgba(37, 99, 235, 0.3);
}

.loading-indicator {
    color: #6b7280;
    font-size: 14px;
    font-style: italic;
    /* display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px; */
    display: block;
}

/* .loading-indicator:before {
    content: "";
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
} */

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Payment History Styles */
.payment-history {
    margin: 30px 0;
}

.payment-history h3 {
    color: #1f2937;
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #e5e7eb;
}

.payment-history-table {
    background: #ffffff;
    border-radius: 0;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.payment-history-table th {
    background: linear-gradient(135deg, #f8fafc 0%, #e2e8f0 100%);
    color: #374151;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 15px 12px;
}

.payment-history-table td {
    padding: 12px;
    border-bottom: 1px solid #f1f5f9;
    color: #4b5563;
    font-size: 14px;
}

.payment-history-table tr:last-child td {
    border-bottom: none;
}

.payment-history-table tr:hover {
    background: #f8fafc;
}

/* Status Badges */
.status-paid {
    color: #065f46;
    font-weight: 600;
}

.status-pending {
    color: #92400e;
    font-weight: 600;
}

.status-failed {
    color: #dc2626;
    font-weight: 600;
}

.status-expired {
    color: #6b7280;
    font-weight: 600;
}

/* Membership Status */
.membership-status {
    padding: 20px;
    border-radius: 0;
    text-align: center;
}

.membership-status.active {
    background: linear-gradient(135deg, #d1fae5 0%, #a7f3d0 100%);
    border: 2px solid #10b981;
}

.membership-status h3 {
    color: #065f46;
    margin-bottom: 10px;
}

.membership-status p {
    color: #047857;
    margin-bottom: 15px;
}

/* Responsive Design */
@media (max-width: 768px) {
    .xendit-payment-form {
        margin: 10px 0;
    }
    
    .xendit-payment-form fieldset {
        padding: 15px;
    }
    
    .payment-methods {
        grid-template-columns: 1fr;
    }
    
    .amount-display {
        font-size: 24px;
        padding: 15px;
    }
    
    .btn-primary {
        width: 100%;
        padding: 15px;
    }
    
    .payment-history-table {
        font-size: 12px;
    }
    
    .payment-history-table th,
    .payment-history-table td {
        padding: 8px 6px;
    }
}

@media (max-width: 480px) {
    .payment-history-table {
        display: block;
        overflow-x: auto;
        white-space: nowrap;
    }
}

/* Error and Success Messages */
.xendit-error-message,
.xendit-success-message {
    position: fixed;
    top: 20px;
    right: 20px;
    padding: 15px 20px;
    border-radius: 0;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 9999;
    max-width: 400px;
    display: none;
}

.xendit-error-message {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}

.xendit-success-message {
    background: #d1fae5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

/* Form validation errors */
.xendit-payment-form input.error,
.xendit-payment-form select.error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

/* Method selection state */
.method-option.selected label {
    border-color: #3b82f6 !important;
    background: #eff6ff !important;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2) !important;
}

/* Admin styles */
.xendit-admin-page {
    max-width: 1000px;
}

.xendit-admin-page .form-table th {
    width: 200px;
    vertical-align: top;
    padding-top: 15px;
}

.xendit-admin-page .regular-text {
    width: 300px;
}

#connection-result {
    margin-top: 15px;
    padding: 12px 16px;
    border-radius: 0;
    font-weight: 500;
}

#connection-result.success {
    background: #d1fae5;
    border: 1px solid #a7f3d0;
    color: #065f46;
}

#connection-result.error {
    background: #fee2e2;
    border: 1px solid #fecaca;
    color: #991b1b;
}