/**
 * Maximum Club Checkout Styles
 * Modern, Minimal, Beautiful
 */

.wwb-maximum-club-section {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 0;
    margin: 24px 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.wwb-maximum-club-section:hover {
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.07);
}

/* Header */
.wwb-maximum-club-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    cursor: pointer;
    user-select: none;
}

.wwb-maximum-club-title {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.wwb-maximum-club-title .wwb-icon {
    width: 24px;
    height: 24px;
    color: #3b82f6;
    flex-shrink: 0;
}

/* Toggle Switch */
.wwb-toggle {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 28px;
}

.wwb-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.wwb-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #e5e7eb;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 28px;
}

.wwb-toggle-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.wwb-toggle input:checked + .wwb-toggle-slider {
    background-color: #3b82f6;
}

.wwb-toggle input:checked + .wwb-toggle-slider:before {
    transform: translateX(20px);
}

/* Content */
.wwb-maximum-club-content {
    padding: 0 24px 24px;
    animation: slideDown 0.3s ease-out;
}

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

/* Steps */
.wwb-step {
    animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Form Groups */
.wwb-form-group {
    margin-bottom: 20px;
}

.wwb-form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 8px;
}

/* Input Fields */
.wwb-input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 15px;
    color: #1f2937;
    background: #ffffff;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.wwb-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.wwb-input::placeholder {
    color: #9ca3af;
}

.wwb-input-otp {
    text-align: center;
    font-size: 24px;
    letter-spacing: 8px;
    font-weight: 600;
}

/* Input Group */
.wwb-input-group {
    display: flex;
    gap: 12px;
    position: relative;
}

.wwb-input-group .wwb-input {
    flex: 1;
}

.wwb-input-suffix {
    position: absolute;
    right: 16px;
    top: 50%;
    transform: translateY(-50%);
    color: #6b7280;
    font-size: 14px;
    pointer-events: none;
}

.wwb-input-group input[type="number"] {
    padding-right: 70px;
}

/* Buttons */
.wwb-btn {
    --wwb-spinner-color: currentColor;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
    overflow: hidden;
}

.wwb-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.wwb-btn.is-loading {
    color: transparent !important;
    pointer-events: none;
}

.wwb-btn.is-loading::after {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    border-radius: 9999px;
    border: 2px solid rgba(148, 163, 184, 0.35);
    border-top-color: var(--wwb-spinner-color);
    border-right-color: var(--wwb-spinner-color);
    animation: spin 0.8s linear infinite;
}

.wwb-btn-primary {
    background: #3b82f6;
    color: white;
    --wwb-spinner-color: #ffffff;
}

.wwb-btn-primary:hover:not(:disabled) {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.wwb-btn-success {
    background: #10b981;
    color: white;
}

.wwb-btn-success:hover:not(:disabled) {
    background: #059669;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.wwb-btn-text {
    background: transparent;
    color: #6b7280;
    padding: 8px 16px;
    --wwb-spinner-color: #6b7280;
}

.wwb-btn-text:hover:not(:disabled) {
    color: #374151;
    background: #f3f4f6;
}

.wwb-btn-block {
    width: 100%;
}

.wwb-btn-loader {
    display: none;
}

.wwb-btn.loading .wwb-btn-text {
    opacity: 0;
}

.wwb-btn.loading .wwb-btn-loader {
    display: block;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Spinner */
.wwb-spinner {
    width: 20px;
    height: 20px;
    animation: spin 0.8s linear infinite;
}

.wwb-spinner-circle {
    fill: none;
    stroke: currentColor;
    stroke-width: 3;
    stroke-dasharray: 50;
    stroke-dashoffset: 0;
    animation: dash 1.5s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

@keyframes dash {
    0% {
        stroke-dashoffset: 50;
    }
    50% {
        stroke-dashoffset: 12.5;
    }
    100% {
        stroke-dashoffset: 50;
    }
}

/* Result Boxes */
.wwb-result-box {
    display: flex;
    gap: 16px;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    animation: scaleIn 0.3s ease-out;
}

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.wwb-result-coupon {
    background: linear-gradient(135deg, #eff6ff 0%, #dbeafe 100%);
    border: 1px solid #bfdbfe;
}

.wwb-result-wallet {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #bbf7d0;
}

.wwb-result-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.wwb-result-coupon .wwb-result-icon {
    color: #3b82f6;
}

.wwb-result-wallet .wwb-result-icon {
    color: #10b981;
}

.wwb-result-icon svg {
    width: 32px;
    height: 32px;
}

.wwb-result-content {
    flex: 1;
}

.wwb-result-content h4 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.wwb-result-text {
    margin: 0;
    font-size: 14px;
    color: #4b5563;
    line-height: 1.6;
}

.wwb-amount {
    color: #3b82f6;
    font-weight: 600;
}

.wwb-result-wallet .wwb-amount {
    color: #10b981;
}

.wwb-balance-info {
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 14px;
}

.wwb-balance-info strong {
    color: #10b981;
    font-size: 16px;
}

/* OTP Box */
.wwb-otp-box {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 20px;
    margin-bottom: 20px;
}

.wwb-otp-header {
    display: flex;
    gap: 16px;
    align-items: start;
    margin-bottom: 20px;
}

.wwb-otp-header .wwb-icon {
    width: 32px;
    height: 32px;
    color: #3b82f6;
    flex-shrink: 0;
}

.wwb-otp-header h4 {
    margin: 0 0 4px 0;
    font-size: 16px;
    font-weight: 600;
    color: #1f2937;
}

.wwb-otp-desc {
    margin: 0;
    font-size: 13px;
    color: #6b7280;
}

/* Wallet Info */
.wwb-wallet-info {
    background: linear-gradient(135deg, #f0fdf4 0%, #dcfce7 100%);
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.wwb-wallet-balance {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wwb-wallet-balance span {
    font-size: 14px;
    color: #4b5563;
}

.wwb-wallet-balance strong {
    font-size: 18px;
    color: #10b981;
}

/* Divider */
.wwb-divider {
    display: flex;
    align-items: center;
    text-align: center;
    margin: 24px 0;
    color: #6b7280;
    font-size: 13px;
    font-weight: 500;
}

.wwb-divider::before,
.wwb-divider::after {
    content: '';
    flex: 1;
    border-bottom: 1px solid #e5e7eb;
}

.wwb-divider span {
    padding: 0 16px;
}

/* Success Box */
.wwb-success-box {
    text-align: center;
    padding: 32px 20px;
}

.wwb-success-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    color: #10b981;
}

.wwb-success-icon svg {
    width: 100%;
    height: 100%;
}

.wwb-success-box h4 {
    margin: 0 0 8px 0;
    font-size: 20px;
    font-weight: 600;
    color: #1f2937;
}

.wwb-success-box p {
    margin: 0;
    font-size: 14px;
    color: #6b7280;
}

/* Messages */
.wwb-message {
    margin-top: 12px;
    padding: 12px 16px;
    border-radius: 6px;
    font-size: 14px;
    display: none;
}

.wwb-message.show {
    display: block;
    animation: slideIn 0.3s ease-out;
}

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

.wwb-message.error {
    background: #fef2f2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.wwb-message.success {
    background: #f0fdf4;
    color: #166534;
    border: 1px solid #bbf7d0;
}

.wwb-message.info {
    background: #eff6ff;
    color: #1e40af;
    border: 1px solid #bfdbfe;
}

/* Helper Text */
.wwb-helper-text {
    margin: 8px 0 0 0;
    font-size: 13px;
    color: #6b7280;
}

/* Auth Card */
.wwb-maximum-auth .wwb-auth-card {
    padding: 24px;
    background: #f9fafb;
    border-top: 1px solid #e5e7eb;
}

.wwb-auth-heading {
    font-size: 18px;
    font-weight: 600;
    color: #1f2937;
    margin-bottom: 8px;
}

.wwb-auth-desc {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 20px;
}

.wwb-auth-form {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.wwb-auth-label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: #374151;
    margin-bottom: 6px;
}

.wwb-auth-label.optional {
    color: #6b7280;
    font-weight: 400;
}

.wwb-auth-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

@media (max-width: 640px) {
    .wwb-auth-grid {
        grid-template-columns: 1fr;
    }
}

.wwb-auth-success {
    text-align: center;
    padding: 24px 12px;
}

.wwb-auth-success-icon {
    width: 48px;
    height: 48px;
    color: #16a34a;
    margin-bottom: 16px;
}

.wwb-auth-warning {
    margin-top: 12px;
    padding: 12px 16px;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    color: #92400e;
    font-size: 14px;
}

/* Icons */
.wwb-icon-inline {
    width: 16px;
    height: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .wwb-maximum-club-header {
        padding: 16px 20px;
    }
    
    .wwb-maximum-club-content {
        padding: 0 20px 20px;
    }
    
    .wwb-maximum-club-title {
        font-size: 15px;
    }
    
    .wwb-input-group {
        flex-direction: column;
    }
    
    .wwb-btn {
        padding: 10px 20px;
        font-size: 14px;
    }
    
    .wwb-result-box {
        flex-direction: column;
        text-align: center;
    }
    
    .wwb-result-icon {
        margin: 0 auto;
    }
    
    .wwb-otp-header {
        flex-direction: column;
        text-align: center;
    }
    
    .wwb-otp-header .wwb-icon {
        margin: 0 auto;
    }
}

/* RTL Support */
[dir="rtl"] .wwb-input-suffix {
    right: auto;
    left: 16px;
}

[dir="rtl"] .wwb-input-group input[type="number"] {
    padding-right: 16px;
    padding-left: 70px;
}

/* Dark Mode Support (optional) */
@media (prefers-color-scheme: dark) {
    .wwb-maximum-club-section {
        background: #1f2937;
        border-color: #374151;
    }
    
    .wwb-maximum-club-title {
        color: #f9fafb;
    }
    
    .wwb-input {
        background: #111827;
        border-color: #374151;
        color: #f9fafb;
    }
    
    .wwb-input:focus {
        border-color: #3b82f6;
    }
    
    .wwb-form-group label {
        color: #e5e7eb;
    }
    
    .wwb-result-content h4,
    .wwb-otp-header h4,
    .wwb-success-box h4 {
        color: #f9fafb;
    }
    
    .wwb-result-text,
    .wwb-otp-desc,
    .wwb-helper-text {
        color: #d1d5db;
    }
}
