/**
 * Stripe Payment CSS for StandAlone Site
 * Seamlessly integrates with existing design system
 */

/* ===========================
   PURCHASE BUTTON
   =========================== */

.purchase-btn {
    position: relative;
    background: linear-gradient(135deg, #5fc73e 0%, #4ab02f 100%);
    border: none;
    border-radius: 12px;
    padding: 0.875rem 3rem;
    color: white;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    box-shadow: 0 4px 12px rgba(95, 199, 62, 0.3);
    overflow: hidden;
    white-space: nowrap;
    z-index: 1;
    min-width: 180px;
}

.purchase-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(95, 199, 62, 0.4);
    background: linear-gradient(135deg, #4ab02f 0%, #3a8e25 100%);
}

.purchase-btn:active {
    transform: translateY(-1px);
}

.purchase-btn-shine {
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
    transition: left 0.6s ease;
    z-index: 0;
}

.purchase-btn:hover .purchase-btn-shine {
    left: 100%;
}

.purchase-btn i {
    font-size: 1.1rem;
    z-index: 1;
}

.purchase-btn span {
    z-index: 1;
}

/* ===========================
   PURCHASE POPUP
   =========================== */

.purchase-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 10040;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.purchase-popup-overlay.show {
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 1;
}

.purchase-popup {
    background: var(--dashboard-white);
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    border: 1px solid var(--dashboard-border);
}

.purchase-popup-overlay.show .purchase-popup {
    transform: scale(1) translateY(0);
}

.purchase-popup-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.5rem 1.5rem 0 1.5rem;
    border-bottom: none;
    margin-bottom: 0;
}

.purchase-popup-header h3 {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dashboard-text);
    margin: 0;
}

.purchase-popup-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    color: var(--dashboard-text-light);
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.purchase-popup-close:hover {
    background: var(--dashboard-hover);
    color: var(--dashboard-text);
}

/* Tab Navigation Styles */
.purchase-popup-tabs {
    display: flex;
    border-bottom: 2px solid var(--dashboard-border);
    padding: 0 1.5rem;
    margin-bottom: 1.5rem;
}

.purchase-tab {
    flex: 1;
    padding: 1rem;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--dashboard-text-secondary);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-bottom: -2px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.purchase-tab:hover {
    color: var(--dashboard-text);
    background: rgba(0, 0, 0, 0.02);
}

.purchase-tab.active {
    color: var(--dashboard-primary);
    border-bottom-color: var(--dashboard-primary);
    background: none;
}

.purchase-tab i {
    font-size: 1rem;
}

/* Tab Content */
.purchase-tab-content {
    display: none;
}

.purchase-tab-content.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

.purchase-popup-content {
    padding: 0 1.5rem 1.5rem 1.5rem;
}

/* ===========================
   PURCHASE SUMMARY
   =========================== */

.purchase-summary {
    background: var(--dashboard-hover);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    border: 1px solid var(--dashboard-border);
}

.purchase-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 0.75rem;
}

.purchase-item:last-child {
    margin-bottom: 0;
}

.purchase-item-label {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
    color: var(--dashboard-text);
    font-weight: 500;
}

.purchase-item-label i {
    font-size: 0.8rem;
    color: var(--primary);
    width: 16px;
}

.purchase-item-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dashboard-text);
}

.purchase-divider {
    height: 1px;
    background: var(--dashboard-border);
    margin: 1rem 0;
}

.purchase-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-top: 0.75rem;
    border-top: 2px solid var(--primary);
}

.purchase-total-label {
    font-size: 1rem;
    font-weight: 700;
    color: var(--dashboard-text);
}

.purchase-total-value {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

.purchase-description {
    background: rgba(95, 199, 62, 0.05);
    border: 1px solid rgba(95, 199, 62, 0.2);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1.5rem;
}

.purchase-description p {
    font-size: 0.9rem;
    color: var(--dashboard-text);
    line-height: 1.5;
    margin: 0;
}

.purchase-description .excel-link,
.purchase-description .login-link {
    color: var(--primary) !important;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    border-bottom: 1px solid transparent;
}

.purchase-description .excel-link:hover,
.purchase-description .login-link:hover {
    color: var(--accent) !important;
    border-bottom-color: var(--accent);
    text-decoration: none;
}

/* ===========================
   CUSTOMER INFORMATION SECTION
   =========================== */

.customer-info-section {
    margin-bottom: 1.5rem;
    padding: 1.25rem;
    background: rgba(95, 199, 62, 0.02);
    border: 1px solid rgba(95, 199, 62, 0.1);
    border-radius: 8px;
}

.section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--dashboard-text);
    margin-bottom: 1rem;
    margin-top: 0;
}

.section-title i {
    font-size: 0.9rem;
    color: var(--primary);
    width: 18px;
}

.form-row {
    margin-bottom: 1rem;
}

.form-row:last-child {
    margin-bottom: 0;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-label {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--dashboard-text);
}

.form-label.required::after {
    content: " *";
    color: var(--danger);
    font-weight: 700;
}

.form-input {
    padding: 0.75rem 1rem;
    border: 2px solid var(--dashboard-border);
    border-radius: 8px;
    font-size: 0.9rem;
    background: var(--dashboard-white);
    color: var(--dashboard-text);
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    width: 100%;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(95, 199, 62, 0.1);
}

.form-input:invalid {
    border-color: var(--danger);
}

.form-input::placeholder {
    color: var(--dashboard-text-light);
}

/* ===========================
   PAYMENT SECTION
   =========================== */

.payment-section {
    margin-bottom: 1.5rem;
}

.payment-methods-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.payment-methods-header h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--dashboard-text);
    margin: 0;
}

.payment-methods-icons {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.2rem;
}

.payment-methods-icons i {
    color: var(--dashboard-text-light);
}

.payment-methods-icons .fab.fa-cc-visa {
    color: #1a1f71;
}

.payment-methods-icons .fab.fa-cc-mastercard {
    color: #eb001b;
}

.payment-methods-icons .fab.fa-apple-pay {
    color: #000;
}

.payment-methods-icons .fab.fa-google-pay {
    color: #4285f4;
}

.vipps-icon {
    background: #ff5b24;
    color: white;
    padding: 0.2rem 0.4rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 700;
}

.payment-element {
    background: var(--dashboard-white);
    border: 2px solid var(--dashboard-border);
    border-radius: 8px;
    padding: 10px;
    transition: border-color 0.3s ease;
}

.payment-element:focus-within {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(95, 199, 62, 0.1);
}

.payment-errors {
    color: var(--danger);
    font-size: 0.85rem;
    margin-top: 0.5rem;
    padding: 0.5rem;
    border-radius: 6px;
    background: rgba(239, 68, 68, 0.05);
    border: 1px solid rgba(239, 68, 68, 0.2);
    display: none;
}

.payment-errors.show {
    display: block;
}

/* ===========================
   POPUP ACTIONS
   =========================== */

.purchase-popup-actions {
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
    padding-top: 1rem;
    border-top: 1px solid var(--dashboard-border);
}

.purchase-btn-cancel {
    background: transparent;
    border: 2px solid var(--dashboard-border);
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    color: var(--dashboard-text);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.purchase-btn-cancel:hover {
    border-color: var(--dashboard-text-light);
    background: var(--dashboard-hover);
}

.purchase-btn-confirm {
    position: relative;
    background: linear-gradient(135deg, var(--primary) 0%, #4a9c30 100%);
    border: none;
    border-radius: 8px;
    padding: 0.75rem 1.5rem;
    color: white;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    min-width: 120px;
    justify-content: center;
}

.purchase-btn-confirm:hover:not(:disabled) {
    background: linear-gradient(135deg, #4a9c30 0%, #3a7a25 100%);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(95, 199, 62, 0.3);
}

.purchase-btn-confirm:disabled {
    opacity: 0.7;
    cursor: not-allowed;
    transform: none;
}

.purchase-btn-loading {
    display: none;
}

.purchase-btn-confirm.loading .purchase-btn-loading {
    display: block;
}

.purchase-btn-confirm.loading i:not(.fa-spinner) {
    display: none;
}

.purchase-btn-confirm.loading span {
    display: none;
}

/* ===========================
   SUCCESS POPUP
   =========================== */

.purchase-popup.success {
    text-align: center;
    max-width: 400px;
}

.success-icon {
    font-size: 4rem;
    color: var(--success);
    margin-bottom: 1rem;
}

.purchase-popup.success h3 {
    font-size: 1.5rem;
    color: var(--dashboard-text);
    margin-bottom: 1rem;
}

.purchase-popup.success p {
    font-size: 1rem;
    color: var(--dashboard-text-light);
    line-height: 1.5;
    margin-bottom: 2rem;
}

/* ===========================
   RESPONSIVE DESIGN
   =========================== */

@media (max-width: 768px) {
    .results-subtitle-row {
        flex-direction: column;
        align-items: stretch;
        gap: 1rem;
    }
    
    .purchase-btn {
        order: -1; /* Show button at top on mobile */
        align-self: center;
        padding: 0.875rem 2rem;
        font-size: 1rem;
        min-width: 200px;
    }
    
    .purchase-popup {
        margin: 1rem;
        width: calc(100% - 2rem);
        max-height: calc(100vh - 2rem);
    }
    
    .purchase-popup-header {
        padding: 1rem 1rem 0 1rem;
        margin-bottom: 0;
    }
    
    .purchase-popup-tabs {
        padding: 0 1rem;
        flex-direction: column;
    }
    
    .purchase-tab {
        font-size: 0.85rem;
        padding: 0.75rem;
        border-bottom: none;
        border-left: 3px solid transparent;
    }
    
    .purchase-tab.active {
        border-left-color: var(--dashboard-primary);
        border-bottom-color: transparent;
    }
    
    .form-row-2col {
        grid-template-columns: 1fr;
    }
    
    .auth-toggle {
        flex-direction: column;
    }
    
    .auth-toggle-btn {
        font-size: 0.85rem;
    }
    
    .purchase-popup-content {
        padding: 0 1rem 1rem 1rem;
    }
    
    .purchase-popup-actions {
        flex-direction: column-reverse;
        gap: 0.75rem;
    }
    
    .purchase-btn-confirm,
    .purchase-btn-cancel {
        width: 100%;
        justify-content: center;
    }
    
    .payment-methods-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 0.75rem;
    }
    
    .form-label {
        font-size: 0.85rem;
    }
    
    .form-input {
        padding: 0.625rem 0.875rem;
        font-size: 0.85rem;
    }
    
    .customer-info-section {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .purchase-btn {
        padding: 0.75rem 1.5rem;
        font-size: 0.9rem;
        min-width: 160px;
    }
    
    .purchase-popup-header h3 {
        font-size: 1.1rem;
    }
    
    .purchase-total-label,
    .purchase-total-value {
        font-size: 1rem;
    }
    
    .payment-methods-icons {
        font-size: 1rem;
        gap: 0.4rem;
    }
}

/* ===========================
   STRIPE ELEMENTS STYLING
   =========================== */

.StripeElement {
    background: transparent;
    padding: 10px;
}

.StripeElement--focus {
    outline: none;
}

.StripeElement--invalid {
    border-color: var(--danger);
}

.StripeElement--webkit-autofill {
    background-color: #fefde7 !important;
}

/* ===========================
   LOADING AND ANIMATIONS
   =========================== */

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

.purchase-popup-overlay.show {
    animation: fadeIn 0.3s ease;
}

.success-icon i {
    animation: successPulse 0.6s ease;
}

@keyframes successPulse {
    0% {
        transform: scale(0.5);
        opacity: 0;
    }
    50% {
        transform: scale(1.1);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* ===========================
   ACCESSIBILITY
   =========================== */

@media (prefers-reduced-motion: reduce) {
    .purchase-btn,
    .purchase-btn-shine,
    .purchase-popup,
    .purchase-popup-overlay,
    .purchase-btn-confirm,
    .purchase-btn-cancel {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
    }
}

@media (prefers-contrast: high) {
    .purchase-btn {
        border: 2px solid #000;
    }
    
    .purchase-popup {
        border: 2px solid #000;
    }
    
    .payment-element {
        border: 2px solid #000;
    }
}

/* ===========================
   AUTHENTICATION STYLES
   =========================== */

.auth-toggle {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    padding: 0.35rem;
    background: #f5f5f5;
    border-radius: 10px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.06);
}

.auth-toggle-btn {
    flex: 1;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid transparent;
    border-radius: 8px;
    color: #666;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    position: relative;
    opacity: 0.7;
}

.auth-toggle-btn:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: translateY(-1px);
    opacity: 0.85;
}

.auth-toggle-btn.active {
    background: linear-gradient(135deg, #5fc73e 0%, #4ab02f 100%);
    color: white;
    border-color: #5fc73e;
    box-shadow: 0 4px 12px rgba(95, 199, 62, 0.4);
    transform: translateY(-2px);
    font-weight: 700;
    opacity: 1;
}

.auth-toggle-btn.active:hover {
    background: linear-gradient(135deg, #6fd84f 0%, #5fc73e 100%);
    box-shadow: 0 6px 16px rgba(95, 199, 62, 0.5);
    transform: translateY(-3px);
}

.auth-toggle-btn.active i {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.1);
    }
    100% {
        transform: scale(1);
    }
}

.auth-form {
    display: none;
}

.auth-form.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

.auth-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dashboard-text);
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-row-2col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-help {
    font-size: 0.8rem;
    color: var(--dashboard-text-secondary);
    margin-top: 0.25rem;
}

.auth-error {
    background: #fee;
    color: var(--dashboard-danger);
    padding: 0.75rem;
    border-radius: 6px;
    margin: 1rem 0;
    font-size: 0.9rem;
    display: none;
}

.auth-error.show {
    display: block;
}

.auth-submit-btn {
    width: 100%;
    padding: 0.875rem;
    background: #5fc73e;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    position: relative;
}

.auth-submit-btn:hover {
    background: #4eb52d;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(95, 199, 62, 0.3);
}

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

.auth-loading {
    display: none;
    position: absolute;
    right: 1rem;
}

.auth-submit-btn.loading .auth-loading {
    display: inline-block;
}

.auth-switch {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--dashboard-text-secondary);
}

.auth-switch a {
    color: var(--dashboard-primary);
    text-decoration: none;
    font-weight: 600;
}

.auth-switch a:hover {
    text-decoration: underline;
}

.auth-success {
    text-align: center;
    padding: 2rem;
}

.auth-success i {
    font-size: 3rem;
    color: var(--dashboard-success);
    margin-bottom: 1rem;
}

.auth-success h4 {
    font-size: 1.25rem;
    color: var(--dashboard-text);
    margin-bottom: 0.5rem;
}

.auth-success p {
    color: var(--dashboard-text-secondary);
    margin-bottom: 1.5rem;
}

/* Focus indicators for keyboard navigation */
.purchase-btn:focus,
.purchase-btn-confirm:focus,
.purchase-btn-cancel:focus,
.purchase-popup-close:focus {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

/* ===========================
   SUBSCRIPTION STATUS STYLES
   =========================== */

.subscription-status {
    padding: 1rem 0;
    animation: fadeIn 0.5s ease-in-out;
}

.subscription-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--dashboard-border);
    position: relative;
}

.subscription-header i {
    color: #f59e0b;
    font-size: 1.5rem;
}

.subscription-header h4 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--dashboard-text);
}

.logout-btn {
    position: absolute;
    right: 0;
    top: 0;
    background: transparent;
    border: 1px solid var(--dashboard-border);
    border-radius: 8px;
    padding: 0.5rem;
    color: var(--dashboard-text-light);
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
}

.logout-btn:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #dc2626;
    transform: translateY(-1px);
}

.subscription-content {
    text-align: center;
}

.subscription-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 1.5rem;
    min-width: 250px;
    justify-content: center;
}

.subscription-badge.active {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(16, 185, 129, 0.3);
}

.subscription-badge.expired {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 4px 15px rgba(245, 158, 11, 0.3);
}

.subscription-badge i {
    font-size: 1.1rem;
}

.subscription-details {
    background: #f8fafc;
    border: 1px solid var(--dashboard-border);
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.subscription-details p {
    margin: 0 0 0.75rem 0;
    font-size: 0.95rem;
    color: var(--dashboard-text);
}

.subscription-details p:last-child {
    margin-bottom: 0;
}

.subscription-details strong {
    color: var(--primary);
    font-weight: 600;
}

.subscription-info {
    background: #fefce8;
    border: 1px solid #fde047;
    border-left: 4px solid #f59e0b;
    border-radius: 12px;
    padding: 1.25rem;
    margin-bottom: 1.5rem;
    text-align: left;
}

.subscription-info h5 {
    margin: 0 0 1rem 0;
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--dashboard-text);
    text-align: center;
}

.subscription-info ul {
    margin: 0;
    padding-left: 1.5rem;
    list-style: none;
}

.subscription-info li {
    margin-bottom: 0.5rem;
    color: var(--dashboard-text);
    position: relative;
}

.subscription-info li:before {
    content: "✓";
    position: absolute;
    left: -1.25rem;
    color: #10b981;
    font-weight: bold;
}

.subscription-actions {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    align-items: center;
}

.subscription-buy-btn {
    background: linear-gradient(135deg, #5fc73e 0%, #4ab02f 100%);
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 12px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    min-width: 250px;
    justify-content: center;
    box-shadow: 0 4px 15px rgba(95, 199, 62, 0.3);
}

.subscription-buy-btn:hover {
    background: linear-gradient(135deg, #4ab02f 0%, #3a8e25 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(95, 199, 62, 0.4);
}

.subscription-buy-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.auth-submit-btn-secondary {
    background: rgba(255, 255, 255, 0.9);
    color: var(--dashboard-text);
    border: 1px solid var(--dashboard-border);
}

.auth-submit-btn-secondary:hover {
    background: var(--dashboard-hover);
    border-color: var(--primary);
}

@media (max-width: 768px) {
    .subscription-header {
        flex-direction: column;
        gap: 0.5rem;
        text-align: center;
    }
    
    .logout-btn {
        position: static;
        margin-top: 0.5rem;
        width: auto;
        padding: 0.5rem 1rem;
        border-radius: 20px;
        font-size: 0.85rem;
    }
    
    .logout-btn:after {
        content: " Logg ut";
        margin-left: 0.25rem;
    }
    
    .subscription-badge {
        min-width: auto;
        width: 100%;
        font-size: 0.9rem;
        padding: 0.875rem 1.25rem;
    }
    
    .subscription-info {
        padding: 1rem;
    }
    
    .subscription-info h5 {
        font-size: 1rem;
    }
    
    .subscription-info ul {
        padding-left: 1.25rem;
    }
    
    .subscription-buy-btn {
        min-width: auto;
        width: 100%;
        font-size: 0.9rem;
    }
    
    .subscription-actions {
        width: 100%;
    }
    
    .subscription-actions .auth-submit-btn {
        width: 100%;
    }
}

/* ===========================
   VILKAAR POPUP (Terms & Conditions)
   Displays on top of purchase popup
   =========================== */

.vilkaar-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(6px);
    z-index: 10050; /* Higher than purchase popup (10040) */
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    align-items: center;
    justify-content: center;
}

.vilkaar-popup-overlay.show {
    display: flex;
    opacity: 1;
}

.vilkaar-popup {
    background: var(--dashboard-white, #ffffff);
    border-radius: 16px;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    max-width: 900px;
    width: 95%;
    max-height: 90vh;
    overflow: hidden;
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0.0, 0.2, 1);
    display: flex;
    flex-direction: column;
}

.vilkaar-popup-overlay.show .vilkaar-popup {
    transform: scale(1) translateY(0);
}

.vilkaar-popup-header {
    background: #1f2937;
    color: #f9fafb;
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #374151;
    flex-shrink: 0;
}

.vilkaar-popup-header h3 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    color: #f9fafb;
}

.vilkaar-popup-close {
    background: none;
    border: none;
    color: #f9fafb;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.vilkaar-popup-close:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.vilkaar-popup-body {
    padding: 0;
    overflow-y: auto;
    flex: 1;
    max-height: calc(90vh - 100px);
}

/* Loading and Error Content */
.loading-content,
.error-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    text-align: center;
    min-height: 200px;
}

.loading-content i {
    font-size: 2rem;
    color: var(--primary, #5fc73e);
    margin-bottom: 1rem;
}

.loading-content p {
    color: var(--dashboard-text-light, #64748b);
    font-size: 1.1rem;
    margin: 0;
}

.error-content i {
    font-size: 3rem;
    color: #ef4444;
    margin-bottom: 1rem;
}

.error-content h3 {
    color: var(--dashboard-text, #334155);
    margin-bottom: 0.5rem;
    font-size: 1.25rem;
}

.error-content p {
    color: var(--dashboard-text-light, #64748b);
    line-height: 1.6;
    margin: 0;
}

/* Vilkaar Content Styling (inherited from footerPopup.css) */
.vilkaar-popup-body .footer-popup-content {
    padding: 2rem;
}

.vilkaar-popup-body .footer-popup-content h1 {
    color: #334155;
    margin-bottom: 1.5rem;
    font-size: 1.875rem;
    font-weight: 700;
    border-bottom: 3px solid #5fc73e;
    padding-bottom: 1rem;
    line-height: 1.2;
}

.vilkaar-popup-body .footer-popup-content h2 {
    color: #334155;
    margin: 2rem 0 1rem 0;
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.3;
}

.vilkaar-popup-body .footer-popup-content h3 {
    color: #334155;
    margin: 1.5rem 0 0.75rem 0;
    font-size: 1.25rem;
    font-weight: 600;
    line-height: 1.3;
}

.vilkaar-popup-body .footer-popup-content p {
    color: #64748b;
    line-height: 1.7;
    margin-bottom: 1rem;
}

.vilkaar-popup-body .footer-popup-content .lead {
    font-size: 1.125rem;
    font-weight: 500;
    color: #334155;
    margin-bottom: 2rem;
    line-height: 1.6;
}

.vilkaar-popup-body .footer-popup-content ul {
    color: #64748b;
    margin: 0 0 1rem 0;
    padding-left: 1.5rem;
}

.vilkaar-popup-body .footer-popup-content li {
    color: #64748b;
    margin-bottom: 0.5rem;
    line-height: 1.6;
}

.vilkaar-popup-body .footer-popup-content a {
    color: #5fc73e;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.vilkaar-popup-body .footer-popup-content a:hover {
    color: #4ab02f;
    text-decoration: underline;
}

.vilkaar-popup-body .footer-popup-content .terms-sections {
    margin: 2rem 0;
}

.vilkaar-popup-body .footer-popup-content .terms-section {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    border-left: 4px solid #5fc73e;
}

.vilkaar-popup-body .footer-popup-content .terms-section:hover {
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1);
    transition: box-shadow 0.2s ease;
}

.vilkaar-popup-body .footer-popup-content .terms-section h3 {
    margin-top: 0;
    margin-bottom: 0.75rem;
    color: #334155;
    font-weight: 600;
}

/* Terms Acceptance Text Styling */
.terms-acceptance {
    font-size: 0.875rem;
    color: var(--dashboard-text-light, #64748b);
    margin: 1rem 0;
    line-height: 1.5;
    text-align: left;
}

/* Center terms acceptance text in auth forms (registration) */
.auth-form .terms-acceptance {
    text-align: center;
}

.vilkaar-link {
    color: var(--primary, #5fc73e);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.vilkaar-link:hover {
    color: #4ab02f;
    text-decoration: underline;
}

/* Responsive Design */
@media (max-width: 768px) {
    .vilkaar-popup {
        width: 98%;
        max-height: 95vh;
        margin: 1rem;
    }
    
    .vilkaar-popup-header {
        padding: 1rem 1.5rem;
    }
    
    .vilkaar-popup-header h3 {
        font-size: 1.25rem;
    }
    
    .vilkaar-popup-body .footer-popup-content {
        padding: 1.5rem;
    }
    
    .vilkaar-popup-body .footer-popup-content h1 {
        font-size: 1.5rem;
    }
    
    .vilkaar-popup-body .footer-popup-content h2 {
        font-size: 1.25rem;
    }
    
    .vilkaar-popup-body .footer-popup-content .terms-section {
        padding: 1rem;
    }
}

@media (max-width: 480px) {
    .vilkaar-popup-header {
        padding: 1rem;
    }
    
    .vilkaar-popup-body .footer-popup-content {
        padding: 1rem;
    }
    
    .vilkaar-popup-body .footer-popup-content .terms-section {
        padding: 0.875rem;
    }
}