/* Enhanced Dashboard Styles for SermonWriterAI */

:root {
    --primary-light: #d2c4e4;
    --primary: #a4b6e5;
    --primary-medium: #6490d3;
    --primary-dark: #4e81bc;
    --primary-darker: #2a6b9d;
    --white: #ffffff;
    --light-gray: #f8f9fa;
    --medium-gray: #e5e5e5;
    --dark-gray: #666666;
    --sidebar-width: 250px;
    --header-height: 70px;
    --success: #4CAF50;
    --warning: #ff9800;
    --danger: #f44336;
}

/* Sacred art background */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    background: url('/img/Religious-art-background.png') center center / cover no-repeat;
    opacity: 0.08;
    z-index: 0;
    pointer-events: none;
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styles */
.dashboard-sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(to bottom, var(--primary-darker), var(--primary-dark));
    color: var(--white);
    position: fixed;
    height: 100vh;
    left: 0;
    top: 0;
    overflow-y: auto;
    z-index: 100;
    transition: all 0.3s ease;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-logo {
    font-size: 1.4rem;
    font-weight: bold;
    color: var(--white);
    text-decoration: none;
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--white);
    cursor: pointer;
    font-size: 1.2rem;
}

.sidebar-profile {
    padding: 1.5rem;
    text-align: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.profile-avatar {
    width: 70px;
    height: 70px;
    border-radius: 50%;
    background-color: var(--primary-light);
    margin: 0 auto 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
}

.profile-avatar i {
    font-size: 2rem;
    color: var(--primary-darker);
}

.profile-name {
    font-weight: 600;
    margin-bottom: 0.5rem;
}

.profile-email {
    font-size: 0.85rem;
    opacity: 0.8;
    word-break: break-all;
}

.sidebar-menu {
    padding: 1.5rem 0;
}

.menu-category {
    font-size: 0.75rem;
    text-transform: uppercase;
    padding: 0.75rem 1.5rem;
    opacity: 0.7;
}

.menu-item,
.menu-item-no-auto-close {
    display: flex;
    align-items: center;
    padding: 0.75rem 1.5rem;
    color: var(--white);
    text-decoration: none;
    transition: all 0.2s ease;
    border-left: 3px solid transparent;
}

.menu-item:hover,
.menu-item-no-auto-close:hover {
    background-color: rgba(255, 255, 255, 0.1);
    border-left-color: var(--primary-light);
}

.menu-item.active,
.menu-item-no-auto-close.active {
    background-color: rgba(255, 255, 255, 0.15);
    border-left-color: var(--white);
}

.menu-icon {
    margin-right: 1rem;
    width: 20px;
    text-align: center;
}

.dashboard-sidebar .menu-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 30px;
    width: 30px;
    height: 30px;
    margin-right: 0;
    border-radius: 8px;
    color: #F0D99B;
    background: rgba(255, 255, 255, 0.08);
}

.create-sermon-btn {
    margin: 1.5rem;
}

.create-sermon-btn a {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1rem;
    background-color: var(--white);
    color: var(--primary-darker);
    font-weight: 600;
    border-radius: 6px;
    text-decoration: none;
    transition: all 0.2s ease;
}

.create-sermon-btn a:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.create-sermon-btn i {
    margin-right: 0.5rem;
}

.sidebar-footer {
    padding: 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.current-plan-info {
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.current-plan-info h4 {
    font-size: 0.9rem;
    margin: 0 0 0.5rem;
}

.plan-details {
    display: flex;
    align-items: center;
    margin-bottom: 0.5rem;
}

.plan-name {
    font-weight: 600;
    margin-right: 0.5rem;
}

.plan-badge {
    font-size: 0.7rem;
    background-color: var(--primary-light);
    color: var(--primary-darker);
    padding: 0.2rem 0.5rem;
    border-radius: 20px;
    font-weight: bold;
}

.sermons-remaining {
    font-size: 0.85rem;
}

.update-plan-btn {
    display: inline-block;
    font-size: 0.8rem;
    color: var(--white);
    text-decoration: underline;
    cursor: pointer;
}

/* Main Content Area */
.dashboard-main {
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    min-height: 100vh;
    background-color: transparent;
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.dashboard-header {
    height: var(--header-height);
    background-color: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid var(--medium-gray);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 99;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.header-title {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
}

.header-subtitle {
    font-size: 0.85rem;
    color: #666;
    margin: 0.25rem 0 0 0;
    font-weight: normal;
}

.header-logo {
    margin-right: 1rem;
}

.small-logo {
    height: 40px;
    width: auto;
}

.header-title h2 {
    margin: 0;
    color: var(--primary-darker);
    font-size: 1.5rem;
    text-align: center;
}

/* Welcome Banner */
.welcome-banner {
    background-color: rgba(210, 196, 228, 0.85);
    padding: 0.75rem 2rem;
    border-bottom: 1px solid var(--medium-gray);
}

.welcome-message {
    color: var(--primary-darker);
    font-weight: 500;
    font-size: 1rem;
    text-align: center;
}

.header-actions {
    display: flex;
    align-items: center;
    position: absolute;
    right: 2rem;
}

.header-icon-btn {
    background: none;
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--dark-gray);
    margin-left: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

#mobile-menu-toggle {
    display: none; /* Hide on desktop */
}

.header-icon-btn:hover {
    background-color: var(--light-gray);
    color: var(--primary-dark);
}

.dashboard-content {
    padding: 2rem;
}

.content-card {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    padding: 1.5rem;
    margin-bottom: 2rem;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.content-title {
    margin: 0;
    color: var(--primary-darker);
}

.content-action {
    color: var(--primary-medium);
    text-decoration: none;
    font-weight: 500;
    display: flex;
    align-items: center;
}

.content-action i {
    margin-left: 0.5rem;
}

/* Upgrade Plan Modal Styles */
.upgrade-modal-content {
    max-width: 900px;
}

.plan-comparison {
    display: flex;
    gap: 1.5rem;
    margin-top: 2rem;
}

.plan-card {
    flex: 1;
    border: 1px solid var(--medium-gray);
    border-radius: 8px;
    padding: 1.5rem;
    text-align: center;
    transition: all 0.3s ease;
    position: relative;
}

.plan-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0, 0, 0, 0.1);
}

.plan-card.recommended {
    border-color: var(--primary-medium);
    box-shadow: 0 5px 15px rgba(100, 144, 211, 0.2);
}

.recommended-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background-color: var(--primary-darker);
    color: white;
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: bold;
}

.plan-name {
    font-size: 1.5rem;
    color: var(--primary-darker);
    margin: 1rem 0;
}

.plan-price {
    font-size: 2.5rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
    color: var(--primary-dark);
}

.plan-billing {
    display: block;
    font-size: 0.9rem;
    color: var(--dark-gray);
    margin-bottom: 1.5rem;
}

.plan-features {
    margin: 1.5rem 0;
    text-align: left;
    padding-left: 0;
    list-style-type: none;
}

.plan-features li {
    margin-bottom: 0.75rem;
    position: relative;
}

.plan-features li .fas {
    color: var(--primary-dark);
    margin-right: 0.5rem;
}

.plan-btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.2s ease;
    width: 100%;
    margin-top: 1rem;
}

.plan-btn-primary {
    background-color: var(--primary-medium);
    color: var(--white);
    border: none;
}

.plan-btn-outline {
    background-color: transparent;
    color: var(--primary-darker);
    border: 1px solid var(--primary-medium);
}

.plan-btn-primary:hover {
    background-color: var(--primary-darker);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.plan-btn-outline:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* Sermon Cards */
.sermon-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 1rem;
}

.sermon-card {
    background-color: rgba(255, 255, 255, 0.9);
    border-radius: 12px;
    border: 1px solid #e0e0e0;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
    overflow: hidden;
    transition: all 0.3s ease;
    height: 100%;
    display: flex;
    flex-direction: column;
    position: relative;
}

.sermon-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
    border-color: #d0d0d0;
}

/* Card header with title and date */
.sermon-card-header {
    background: linear-gradient(45deg, var(--primary-light), var(--primary-lighter));
    padding: 1.25rem 1.5rem;
    position: relative;
    border-bottom: 1px solid #e0e0e0;
}

.sermon-card-title {
    margin: 0 0 0.5rem 0;
    color: var(--primary-darker);
    font-size: 1.2rem;
    font-weight: 600;
    line-height: 1.4;
    /* Allow long titles to wrap */
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.sermon-card-date {
    display: inline-block;
    font-size: 0.85rem;
    color: var(--primary-dark);
    margin-bottom: 0.25rem;
}

/* Passages section */
.sermon-card-passages {
    padding: 1rem 1.5rem 0.5rem;
    font-style: italic;
    color: var(--primary-dark);
    border-bottom: 1px dashed #e8e8e8;
    font-size: 0.95rem;
    background-color: rgba(210, 196, 228, 0.1);
}

/* Preview text */
.sermon-card-preview {
    padding: 1rem 1.5rem;
    flex: 1;
    height: 4.8em; /* Show exactly 3 lines */
    overflow: hidden;
    text-overflow: ellipsis;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    color: var(--dark-gray);
    line-height: 1.6;
    font-size: 0.95rem;
}

/* Card actions */
.sermon-card-actions {
    padding: 1rem 1.5rem;
    border-top: 1px solid #e0e0e0;
    display: flex;
    justify-content: flex-end;
    background-color: #fafafa;
}

.btn-view-sermon {
    padding: 0.5rem 1rem;
    border-radius: 30px;
    font-size: 0.9rem;
    background: linear-gradient(45deg, var(--primary-dark), var(--primary));
    color: white;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.btn-view-sermon:hover {
    background: linear-gradient(45deg, var(--primary), var(--primary-medium));
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

/* Empty state styling */
.empty-state-message {
    text-align: center;
    padding: 2rem;
    color: var(--dark-gray);
    font-size: 1.1rem;
}

.empty-state-message a {
    color: var(--primary);
    text-decoration: none;
    font-weight: 500;
}

.empty-state-message a:hover {
    text-decoration: underline;
}

/* Loading spinner styling */
.loading-spinner {
    display: block;
    width: 40px;
    height: 40px;
    margin: 2rem auto;
    border: 4px solid rgba(100, 144, 211, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive Adjustments */
@media (max-width: 768px) {
    .first-time-offer-content {
        width: min(94vw, 430px);
        max-height: 90vh;
        margin: 3vh auto;
    }

    .first-time-offer-kicker {
        padding: 0.9rem 3.25rem 0.9rem 1.25rem;
        font-size: 0.82rem;
    }

    .first-time-offer-icon {
        width: 70px;
        height: 70px;
        margin-top: 1.5rem;
        border-radius: 20px;
        font-size: 1.9rem;
    }

    .first-time-offer-content h2 {
        padding: 0 1.2rem;
        font-size: 1.85rem;
    }

    .first-time-offer-copy {
        padding: 0 1.25rem;
        font-size: 0.94rem;
    }

    .first-time-offer-coupon,
    .first-time-offer-actions {
        width: calc(100% - 2rem);
    }

    .first-time-offer-ticket strong {
        font-size: 1.35rem;
    }

    .first-time-offer-ticket > div {
        padding: 1rem 0.6rem;
    }

    .dashboard-sidebar {
        transform: translateX(-100%);
        position: fixed;
        top: 0;
        left: 0;
        height: 100vh;
        width: var(--sidebar-width);
        z-index: 1000;
        transition: transform 0.3s ease;
    }
    
    .dashboard-sidebar.active {
        transform: translateX(0);
    }
    
    .dashboard-main {
        margin-left: 0;
        width: 100%;
    }
    
    .dashboard-main.sidebar-active {
        margin-left: 0;
        width: 100%;
        position: relative;
    }
    
    .dashboard-main.sidebar-active::after {
        content: '';
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background-color: rgba(0, 0, 0, 0.5);
        z-index: 99;
    }
    
    .plan-comparison {
        flex-direction: column;
    }
    
    .sermon-grid {
        grid-template-columns: 1fr;
    }
    
    .header-title {
        margin: 0 auto;
        justify-content: center;
    }
    
    .welcome-banner {
        padding: 0.75rem 1rem;
    }
    
    .header-actions {
        right: 1rem;
    }
    
    #mobile-menu-toggle {
        display: flex;
        color: var(--primary-darker);
        font-size: 1.2rem;
        background-color: var(--light-gray);
    }
    
    #mobile-menu-toggle:hover {
        background-color: var(--primary-light);
        color: var(--primary-darker);
    }
}

/* Animation Effects */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes slideInLeft {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.slide-in-left {
    animation: slideInLeft 0.3s ease-in-out;
}

/* Dashboard Footer */
.dashboard-footer {
    background-color: var(--white);
    border-top: 1px solid var(--medium-gray);
    padding: 1.5rem 2rem;
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.03);
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.footer-logo {
    margin-bottom: 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.dashboard-footer-links {
    margin-top: 0.75rem;
}

.dashboard-footer-links a {
    color: var(--primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.dashboard-footer-links a:hover {
    color: var(--primary-darker);
    text-decoration: underline;
}

.footer-content p {
    margin: 0;
    color: var(--dark-gray);
    font-size: 0.9rem;
}

@media (max-width: 768px) {
    .dashboard-footer {
        margin-left: 0;
        width: 100%;
    }
}

/* Dashboard Sections */
.dashboard-section {
    display: none;
}

.dashboard-section.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Persistent Plan Information Bar */
.plan-info-bar {
    background-color: var(--primary-darker);
    color: var(--white);
    padding: 1rem 0;
    margin-left: var(--sidebar-width);
    width: calc(100% - var(--sidebar-width));
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    position: sticky;
    bottom: 0;
    z-index: 98;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
}

.plan-info-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.plan-info-item {
    display: flex;
    align-items: center;
}

.plan-info-label {
    font-size: 0.9rem;
    opacity: 0.8;
    margin-right: 0.5rem;
}

.plan-info-value {
    font-size: 1.1rem;
    font-weight: 600;
}

.plan-info-upgrade-btn {
    background-color: var(--white);
    color: var(--primary-darker);
    border: none;
    border-radius: 4px;
    padding: 0.6rem 1.2rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    transition: all 0.2s ease;
}

.plan-info-upgrade-btn:hover {
    background-color: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .plan-info-bar {
        margin-left: 0;
        width: 100%;
    }
    
    .plan-info-container {
        flex-direction: column;
        gap: 1rem;
        padding: 1rem;
    }
    
    .plan-info-item {
        width: 100%;
        justify-content: space-between;
    }
    
    .plan-info-upgrade-btn {
        width: 100%;
        justify-content: center;
    }
}

/* Enhanced Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.6);
}

.modal-content {
    background-color: var(--white);
    margin: 5% auto;
    padding: 2rem;
    border-radius: 8px;
    width: 80%;
    max-width: 900px;
    max-height: 80vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 5px 15px rgba(0,0,0,0.3);
}

.close-button {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    color: #aaa;
    font-size: 2rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-button:hover {
    color: #333;
}

.modal-actions {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid var(--medium-gray);
    text-align: right;
}

/* First-Time Dashboard Offer */
#first-time-offer-modal.first-time-offer-modal {
    background: rgba(11, 18, 32, 0.72) !important;
    backdrop-filter: blur(8px) !important;
    align-items: center !important;
    justify-content: center !important;
}

#first-time-offer-modal .modal-content.first-time-offer-content {
    position: relative !important;
    width: min(92vw, 620px);
    max-width: min(92vw, 620px) !important;
    max-height: calc(100vh - 2rem);
    margin: 1rem auto !important;
    padding: 0 !important;
    overflow-y: auto;
    text-align: center;
    color: #ffffff !important;
    background:
        radial-gradient(circle at 50% 5%, rgba(240, 217, 155, 0.22), transparent 34%),
        linear-gradient(180deg, #173a5d 0%, #102a45 52%, #0b2036 100%) !important;
    border: 1px solid rgba(240, 217, 155, 0.28) !important;
    box-shadow: 0 24px 70px rgba(8, 20, 36, 0.48) !important;
}

#first-time-offer-modal .modal-content.first-time-offer-content::before {
    content: '';
    position: absolute;
    inset: 0;
    background: url('/img/Religious-art-background.png') center center / cover no-repeat;
    opacity: 0.11;
    pointer-events: none;
}

#first-time-offer-modal .modal-content.first-time-offer-content > * {
    position: relative;
    z-index: 1;
}

#first-time-offer-modal .first-time-offer-close {
    position: absolute !important;
    top: 16px !important;
    right: 16px !important;
    left: auto !important;
    margin: 0 !important;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.16);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    pointer-events: auto !important;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
    transition: transform 0.2s ease, background 0.2s ease;
    z-index: 50 !important;
}

#first-time-offer-modal .first-time-offer-close i {
    pointer-events: none;
}

.first-time-offer-close:hover {
    transform: scale(1.04);
    background: rgba(255, 255, 255, 0.18);
}

.first-time-offer-kicker {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 1rem 3.5rem;
    color: rgba(255, 255, 255, 0.78);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.95rem;
    font-weight: 600;
}

.first-time-offer-kicker i {
    color: #f0d99b;
}

.first-time-offer-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 88px;
    height: 88px;
    margin: 1.25rem auto 0.85rem;
    border-radius: 24px;
    color: #16395d;
    background: linear-gradient(135deg, #fff5cf, #f0d99b);
    box-shadow: 0 16px 36px rgba(240, 217, 155, 0.32);
    font-size: 2.35rem;
}

#first-time-offer-modal .modal-content.first-time-offer-content h2 {
    max-width: 520px;
    margin: 0 auto;
    padding: 0 2rem;
    color: #ffffff !important;
    font-family: 'Fraunces', Georgia, serif;
    font-size: 2.28rem;
    line-height: 1.08;
}

#first-time-offer-modal .first-time-offer-copy {
    max-width: 500px;
    margin: 0.85rem auto 1.1rem;
    padding: 0 2rem;
    color: rgba(255, 255, 255, 0.86) !important;
    font-size: 1.02rem;
    line-height: 1.6;
}

#first-time-offer-modal .first-time-offer-copy strong {
    color: #f0d99b;
}

#first-time-offer-modal .first-time-offer-coupon {
    width: min(100% - 3rem, 500px);
    margin: 0 auto 1.15rem;
    overflow: hidden;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.09);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

#first-time-offer-modal .first-time-offer-applied {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.55rem;
    padding: 1rem;
    color: rgba(255, 255, 255, 0.9) !important;
    font-size: 0.95rem;
}

.first-time-offer-applied i,
.first-time-offer-applied strong {
    color: #f0d99b;
}

.first-time-offer-ticket {
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-top: 1px dashed rgba(255, 255, 255, 0.24);
}

.first-time-offer-ticket > div {
    padding: 1.2rem 1rem;
}

.first-time-offer-ticket > div + div {
    border-left: 1px dashed rgba(255, 255, 255, 0.24);
}

.first-time-offer-ticket strong {
    display: block;
    color: #f0d99b;
    font-size: 1.65rem;
    line-height: 1.1;
}

#first-time-offer-modal .first-time-offer-ticket span {
    display: block;
    margin-top: 0.45rem;
    color: rgba(255, 255, 255, 0.72) !important;
    font-size: 0.82rem;
}

.first-time-offer-actions {
    display: grid;
    gap: 0.75rem;
    width: min(100% - 3rem, 500px);
    margin: 0 auto 1.45rem;
}

.first-time-offer-primary,
.first-time-offer-secondary {
    min-height: 52px;
    border-radius: 8px;
    font-weight: 800;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.first-time-offer-primary {
    border: 0;
    color: #102a45;
    background: linear-gradient(135deg, #fff5cf, #f0d99b);
    box-shadow: 0 10px 24px rgba(240, 217, 155, 0.26);
}

.first-time-offer-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 14px 30px rgba(240, 217, 155, 0.34);
}

.first-time-offer-secondary {
    color: rgba(255, 255, 255, 0.82);
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.18);
}

.first-time-offer-secondary:hover {
    background: rgba(255, 255, 255, 0.08);
}

/* Tab styles for backward compatibility */
.tabs {
    display: flex;
    border-bottom: 1px solid var(--medium-gray);
    margin-bottom: 2rem;
}

.tab-button {
    padding: 1rem 1.5rem;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.1rem;
    position: relative;
    color: var(--dark-gray);
    transition: color 0.3s;
}

.tab-button:hover {
    color: var(--primary-darker);
}

.tab-button.active {
    color: var(--primary-darker);
    font-weight: 600;
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 3px;
    background-color: var(--primary-darker);
}

.tab-pane {
    display: none;
    padding: 1rem 0;
}

.tab-pane.active {
    display: block;
}

/* Additional responsive styles */
@media (max-width: 768px) {
    .modal-content {
        width: 90%;
        margin: 10% auto;
    }
}

/* Add styles for admin-only elements */
.admin-only {
    display: none; /* Hidden by default */
}

body.is-admin .admin-only {
    display: flex; /* Show for admin users */
}

/* Sermon Modal */
.sermon-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.7);
    z-index: 1000;
    display: flex;
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(3px);
    transition: opacity 0.3s ease;
}

.sermon-modal-content {
    background-color: var(--white);
    border-radius: 12px;
    box-shadow: 0 5px 25px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 1100px;
    max-height: 85vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    animation: modal-slide-in 0.3s ease forwards;
}

@keyframes modal-slide-in {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.sermon-modal-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e0e0e0;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: linear-gradient(to right, var(--primary-light), var(--white));
}

.sermon-modal-title {
    margin: 0;
    color: var(--primary-darker);
    font-size: 1.4rem;
    font-weight: 600;
    flex: 1;
}

.sermon-search-container {
    position: relative;
    flex: 2;
    max-width: 400px;
    margin: 0 1.5rem;
}

.sermon-search-input {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.5rem;
    border: 1px solid #d0d0d0;
    border-radius: 30px;
    background-color: white;
    font-size: 0.95rem;
    transition: all 0.2s ease;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="16" height="16" fill="%236490d3"><path d="M23.707,22.293l-5.969-5.969a10.016,10.016,0,1,0-1.414,1.414l5.969,5.969a1,1,0,0,0,1.414-1.414ZM10,18a8,8,0,1,1,8-8A8.009,8.009,0,0,1,10,18Z"/></svg>');
    background-repeat: no-repeat;
    background-position: 12px center;
}

.sermon-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(100, 144, 211, 0.2);
    outline: none;
}

.sermon-modal-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: var(--primary-dark);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.sermon-modal-close:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: var(--primary-darker);
}

.sermon-modal-body {
    padding: 1.5rem;
    overflow-y: auto;
    flex-grow: 1;
    background-color: #f9f9f9;
}

/* No results message when search returns empty */
.no-results-message {
    grid-column: 1 / -1;
    text-align: center;
    padding: 3rem 1rem;
    color: var(--dark-gray);
    font-size: 1.1rem;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

/* NEW Feature Badge */
.new-feature-badge {
    position: absolute;
    top: 5px;
    left: auto;
    right: 8px;
    background: linear-gradient(135deg, var(--gold, #D6A84F), #F0D99B);
    color: var(--primary-dark, #4A0D24);
    font-size: 0.65rem;
    font-weight: 700;
    padding: 0.25rem 0.5rem;
    border-radius: 999px;
    letter-spacing: 0.5px;
    box-shadow: none;
    animation: none;
} 
.new-feature-badge--right {
    left: auto;
    right: 8px;
}

.new-feature-badge--orange {
    background: linear-gradient(135deg, var(--gold, #D6A84F), #F0D99B);
    color: var(--primary-dark, #4A0D24);
    box-shadow: none;
    animation: none;
}

/* Settings Links Styles */
.settings-links {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.settings-link-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem;
    background: #f8f9fa;
    border-radius: 8px;
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
    border: 1px solid #e5e5e5;
}

.settings-link-item:hover {
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    transform: translateY(-2px);
    border-color: var(--primary);
}

.settings-link-icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: 12px;
    font-size: 1.25rem;
}

.settings-link-content {
    flex: 1;
}

.settings-link-content h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1rem;
    font-weight: 600;
    color: #333;
}

.settings-link-content p {
    margin: 0;
    font-size: 0.875rem;
    color: #666;
    line-height: 1.4;
}

.settings-link-item > .fa-chevron-right {
    flex-shrink: 0;
    color: #999;
    font-size: 0.875rem;
    transition: all 0.3s ease;
}

.settings-link-item:hover > .fa-chevron-right {
    color: var(--primary);
    transform: translateX(4px);
}

/* Sermon Mode Preference */
.sermon-mode-setting {
    background: linear-gradient(135deg, rgba(42, 107, 157, 0.06), rgba(160, 98, 63, 0.08));
    border: 1px solid rgba(42, 107, 157, 0.18);
    border-radius: 8px;
    padding: 1.25rem;
    margin: 1.5rem 0;
}

.sermon-mode-setting-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    margin-bottom: 1rem;
}

.sermon-mode-setting-header h4 {
    margin: 0 0 0.25rem;
    color: var(--primary-darker);
    font-size: 1.05rem;
}

.sermon-mode-setting-header p {
    margin: 0;
    color: #5f6c75;
    line-height: 1.45;
}

.sermon-mode-status {
    flex-shrink: 0;
    background: #fff;
    border: 1px solid rgba(42, 107, 157, 0.18);
    border-radius: 999px;
    color: var(--primary-dark);
    font-size: 0.78rem;
    font-weight: 700;
    padding: 0.35rem 0.7rem;
    white-space: nowrap;
}

.sermon-mode-status.saved {
    background: #e9f7ef;
    border-color: #bde5cb;
    color: #1f7a45;
}

.sermon-mode-status.error {
    background: #fff1f0;
    border-color: #f3c1bd;
    color: #b83228;
}

.sermon-mode-options {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.9rem;
    margin-bottom: 1rem;
}

.sermon-mode-option {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(42, 107, 157, 0.14);
    border-radius: 8px;
    cursor: pointer;
    padding: 1rem;
    transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.sermon-mode-option:hover {
    border-color: rgba(42, 107, 157, 0.45);
    box-shadow: 0 8px 18px rgba(42, 107, 157, 0.08);
    transform: translateY(-1px);
}

.sermon-mode-option.active {
    background: #fff;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(42, 107, 157, 0.12);
}

.sermon-mode-option input {
    margin-top: 0.2rem;
}

.sermon-mode-option-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    background: rgba(42, 107, 157, 0.1);
    color: var(--primary-dark);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.sermon-mode-option.active .sermon-mode-option-icon {
    background: var(--primary);
    color: #fff;
}

.sermon-mode-option-copy {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    min-width: 0;
}

.sermon-mode-option-copy strong {
    color: #27333b;
    font-size: 0.98rem;
}

.sermon-mode-option-copy span {
    color: #64717c;
    font-size: 0.9rem;
    line-height: 1.45;
}

.sermon-mode-save-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    .sermon-mode-setting-header {
        flex-direction: column;
    }

    .sermon-mode-options {
        grid-template-columns: 1fr;
    }
}
