/* 
Dedicated styling for the trial banner component.
*/

.trial-banner {
    background: linear-gradient(to right, var(--primary-color), var(--primary-dark));
    border-radius: 8px;
    padding: 0 1.25rem;
    margin: 0.75rem 0;
    box-shadow: var(--box-shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
    color: white;
    height: 40px;
    font-family: 'Inter', sans-serif;
    gap: 20px; /* Reduced gap for more compact layout */
}

[data-theme="dark"] .trial-banner {
    background: linear-gradient(to right, var(--primary-color), #181a20);
    color: var(--text-primary);
}

.trial-info-group {
    display: flex;
    align-items: center;
    gap: 20px;
    flex-shrink: 0; /* Prevent this group from shrinking */
}

.trial-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

.trial-header h3 {
    margin: 0;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.trial-badge {
    background-color: rgba(255, 255, 255, 0.15);
    padding: 2px 6px;
    border-radius: 6px;
    font-size: 10px;
    font-weight: 500;
}

[data-theme="dark"] .trial-badge {
    background-color: rgba(59, 130, 246, 0.2);
    color: #60a5fa;
}

.trial-details {
    display: flex;
    align-items: center;
    gap: 20px;
}

.trial-metric {
    text-align: center;
    min-width: 60px;
}

.trial-metric-value {
    font-size: 17px;
    font-weight: 700;
    transition: color 0.3s ease;
}

.trial-metric-value.warning {
    color: #ffc107; /* Orange color */
}

.trial-metric-label {
    font-size: 9px;
    opacity: 0.8;
    text-transform: uppercase;
}

.trial-progress {
    flex-grow: 1; /* Allow progress bar to take up remaining space */
    min-width: 100px; /* Ensure it has a minimum width */
}

.progress-bar {
    height: 6px;
    background-color: rgba(255, 255, 255, 0.25);
    border-radius: 9999px; /* Rounded bar */
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background-color: #ffffff;
    border-radius: 9999px;
    transition: width 0.3s ease-in-out;
}

.progress-fill.warning {
    background-color: #ffc107; /* Orange color */
}

[data-theme="dark"] .progress-bar {
    background-color: rgba(59, 130, 246, 0.25);
}

[data-theme="dark"] .progress-fill {
    background-color: #60a5fa;
}

[data-theme="dark"] .progress-fill.warning {
    background-color: #fbbf24; /* Lighter orange for dark mode */
}

.trial-actions {
    flex-shrink: 0; /* Prevent the button from shrinking */
    margin-left: auto; /* Push to the right */
}

/* New Button Style */
.trial-actions .trial-btn {
    background-color: #ffffff;
    color: #2563eb;
    border: none;
    padding: 7px 12px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    transition: all 0.2s ease-in-out;
    white-space: nowrap;
}

.trial-actions .trial-btn:hover {
    transform: scale(1.05);
    background-color: #f8fafc;
}

/* Dark mode button styles */
[data-theme="dark"] .trial-actions .trial-btn {
    background-color: #3b82f6;
    color: #ffffff;
    border: 1px solid #60a5fa;
}

[data-theme="dark"] .trial-actions .trial-btn:hover {
    background-color: #2563eb;
    border-color: #3b82f6;
    transform: scale(1.05);
}

.trial-actions .trial-btn i {
    font-family: "Font Awesome 6 Free";
    font-weight: 900;
    font-size: 11px;
}

/* Responsive adjustments */
@media (max-width: 900px) {
    .trial-banner {
        flex-wrap: nowrap;
        height: auto;
        padding: 0.5rem 0.75rem;
        gap: 0.5rem;
        min-height: 36px;
    }

    .trial-info-group {
        flex: 1;
        justify-content: flex-start;
        gap: 0.5rem;
        align-items: center;
    }
    
    .trial-progress {
        order: 3;
        width: 100%;
        flex-basis: 100%;
        margin-top: 0.25rem;
    }

    .trial-actions {
        flex-shrink: 0;
        margin-left: auto;
    }
}

@media (max-width: 600px) {
    .trial-banner {
        padding: 0.4rem 0.6rem;
        gap: 0.4rem;
        min-height: 32px;
        flex-wrap: nowrap;
    }
    
    .trial-info-group {
        gap: 0.25rem;
        flex: 1;
    }
    
    .trial-header h3 {
        font-size: 10px;
    }
    
    .trial-badge {
        padding: 1px 4px;
        font-size: 9px;
    }
    
    .trial-metric-value {
        font-size: 15px;
    }
    
    .trial-metric-label {
        font-size: 8px;
    }
    
    .trial-actions .trial-btn {
        padding: 5px 8px;
        font-size: 10px;
    }
    
    /* Hide progress bar on smaller screens to save space */
    .trial-progress {
        display: none;
    }
}

@media (max-width: 500px) {
    .trial-banner {
        padding: 0.3rem 0.5rem;
        gap: 0.3rem;
        min-height: 28px;
        flex-wrap: nowrap;
    }
    
    .trial-info-group {
        flex-direction: row;
        justify-content: flex-start;
        align-items: center;
        flex: 1;
    }
    
    .trial-details {
        gap: 0.5rem;
        margin-left: auto;
    }
    
    .trial-metric {
        min-width: 45px;
    }
    
    .trial-metric-value {
        font-size: 13px;
    }
    
    .trial-metric-label {
        font-size: 7px;
    }
    
    .trial-header h3 {
        font-size: 9px;
    }
    
    .trial-actions .trial-btn {
        padding: 4px 6px;
        font-size: 9px;
        gap: 3px;
    }
    
    .trial-actions .trial-btn i {
        font-size: 9px;
    }
}

@media (max-width: 400px) {
    .trial-banner {
        padding: 0.25rem 0.4rem;
        gap: 0.25rem;
        min-height: 24px;
        flex-wrap: nowrap;
    }
    
    .trial-header h3 {
        font-size: 8px;
    }
    
    .trial-badge {
        padding: 1px 3px;
        font-size: 8px;
    }
    
    .trial-details {
        gap: 0.4rem;
        margin-left: auto;
    }
    
    .trial-metric {
        min-width: 40px;
    }
    
    .trial-metric-value {
        font-size: 12px;
    }
    
    .trial-metric-label {
        font-size: 6px;
    }
    
    .trial-actions .trial-btn {
        padding: 3px 5px;
        font-size: 8px;
        gap: 2px;
    }
    
    .trial-actions .trial-btn i {
        font-size: 8px;
    }
}

/* Payment method modal removed — handled by PaySuite checkout */

/* Payment Loading Spinner */
.payment-loading {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
}
.spinner {
    display: inline-block;
    width: 24px;
    height: 24px;
    border: 3px solid #2563eb;
    border-radius: 50%;
    border-top: 3px solid #fff;
    animation: spin 1s linear infinite;
    margin-top: 1em;
}
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.upgrade-modal .pricing-plan.current {
    border: 2px solid #22c55e;
    background: rgba(34,197,94,0.08);
    box-shadow: 0 0 0 2px #22c55e33;
}

/* Success Modal Styles */
.success-modal-overlay {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.5);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.success-modal {
    background: #ffffff;
    border-radius: 12px;
    padding: 2rem;
    text-align: center;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.success-icon {
    width: 60px;
    height: 60px;
    background: #10b981;
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: bold;
    margin: 0 auto 1rem;
}

.success-modal h3 {
    color: #1f2937;
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
}

.success-modal p {
    color: #6b7280;
    margin: 0.5rem 0;
    line-height: 1.5;
}

.countdown-number {
    font-weight: bold;
    color: #3b82f6;
    font-size: 1.1em;
}

.success-actions {
    display: flex;
    gap: 0.75rem;
    margin-top: 1.5rem;
    justify-content: center;
}

.refresh-now-btn, .refresh-later-btn {
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 6px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.refresh-now-btn {
    background: #3b82f6;
    color: white;
}

.refresh-now-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
}

.refresh-later-btn {
    background: #f3f4f6;
    color: #374151;
    border: 1px solid #d1d5db;
}

.refresh-later-btn:hover {
    background: #e5e7eb;
}

/* Dark mode styles for success modal */
[data-theme="dark"] .success-modal {
    background: #1f2937;
    color: #f9fafb;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

[data-theme="dark"] .success-modal h3 {
    color: #f9fafb;
}

[data-theme="dark"] .success-modal p {
    color: #d1d5db;
}

[data-theme="dark"] .refresh-later-btn {
    background: #374151;
    color: #d1d5db;
    border-color: #4b5563;
}

[data-theme="dark"] .refresh-later-btn:hover {
    background: #4b5563;
} 