/**
 * Sugarloaf Church Strategy Portal - Custom Styles
 */

/* Color Variables - Sugarloaf Church Brand */
:root {
    /* Brand Colors from Logo */
    --brand-orange: #F7941D;
    --brand-blue: #2E6EB5;
    --brand-black: #1A1A1A;
    
    /* Application Colors */
    --primary-color: #2E6EB5;      /* Blue from logo */
    --secondary-color: #F7941D;    /* Orange from logo */
    --success-color: #28a745;
    --warning-color: #F7941D;      /* Orange */
    --danger-color: #dc3545;
    --light-color: #f8f9fa;
    --dark-color: #1A1A1A;
    
    /* Gate Status Colors */
    --gate-locked: #6c757d;
    --gate-current: #F7941D;       /* Orange - current focus */
    --gate-complete: #28a745;
}

/* Override Bootstrap primary color */
.bg-primary {
    background-color: var(--primary-color) !important;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

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

.text-primary {
    color: var(--primary-color) !important;
}

/* Layout */
html, body {
    height: 100%;
}

body {
    display: flex;
    flex-direction: column;
    background-color: #f4f6f9;
}

main {
    flex: 1;
}

/* Cards */
.card {
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    border: none;
    border-radius: 0.5rem;
}

.card-header {
    background-color: #fff;
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    font-weight: 600;
}

/* Dashboard Stats Cards */
.stat-card {
    border-left: 4px solid var(--primary-color);
}

.stat-card.success {
    border-left-color: var(--success-color);
}

.stat-card.warning {
    border-left-color: var(--warning-color);
}

.stat-card.info {
    border-left-color: var(--secondary-color);
}

.stat-card .stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary-color);
}

.stat-card .stat-label {
    color: #6c757d;
    font-size: 0.875rem;
    text-transform: uppercase;
}

/* Gate Timeline */
.gate-timeline {
    position: relative;
    padding: 0;
    list-style: none;
}

.gate-timeline::before {
    content: '';
    position: absolute;
    left: 24px;
    top: 0;
    bottom: 0;
    width: 4px;
    background: #e9ecef;
}

.gate-item {
    position: relative;
    padding-left: 70px;
    padding-bottom: 30px;
}

.gate-item:last-child {
    padding-bottom: 0;
}

.gate-marker {
    position: absolute;
    left: 0;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--gate-locked);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    font-size: 1.25rem;
    z-index: 1;
}

.gate-item.current .gate-marker {
    background: var(--gate-current);
    box-shadow: 0 0 0 4px rgba(46, 134, 171, 0.3);
}

.gate-item.completed .gate-marker {
    background: var(--gate-complete);
}

.gate-item.locked .gate-marker {
    background: var(--gate-locked);
}

.gate-content {
    background: white;
    border-radius: 0.5rem;
    padding: 1.25rem;
    box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
}

.gate-item.current .gate-content {
    border: 2px solid var(--gate-current);
}

.gate-item.locked .gate-content {
    opacity: 0.7;
}

/* Milepost List */
.milepost-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.milepost-item {
    display: flex;
    align-items: flex-start;
    padding: 0.75rem 0;
    border-bottom: 1px solid #e9ecef;
}

.milepost-item:last-child {
    border-bottom: none;
}

.milepost-number {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    background: #e9ecef;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.875rem;
    margin-right: 1rem;
    flex-shrink: 0;
}

.milepost-item.completed .milepost-number {
    background: var(--success-color);
    color: white;
}

.milepost-item.in-progress .milepost-number {
    background: var(--secondary-color);
    color: white;
}

.milepost-item.locked {
    opacity: 0.6;
}

/* Task Checklist */
.task-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.task-item {
    display: flex;
    align-items: flex-start;
    padding: 0.5rem 0;
}

.task-item .form-check-input {
    margin-top: 0.25rem;
    margin-right: 0.75rem;
}

.task-item.completed .task-text {
    text-decoration: line-through;
    color: #6c757d;
}

/* Progress Bars */
.progress {
    height: 0.5rem;
    border-radius: 0.25rem;
}

.progress-thick {
    height: 1.5rem;
}

.progress-thick .progress-bar {
    line-height: 1.5rem;
    font-size: 0.75rem;
}

/* Timeline Display */
.timeline-event {
    position: relative;
    padding-left: 30px;
    padding-bottom: 20px;
    border-left: 2px solid #e9ecef;
}

.timeline-event:last-child {
    border-left: 2px solid transparent;
}

.timeline-event::before {
    content: '';
    position: absolute;
    left: -6px;
    top: 0;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #6c757d;
}

.timeline-event.completed::before {
    background: var(--success-color);
}

.timeline-event.today::before {
    background: var(--secondary-color);
    box-shadow: 0 0 0 4px rgba(46, 134, 171, 0.3);
}

.timeline-event.upcoming::before {
    background: #e9ecef;
    border: 2px solid #6c757d;
}

/* Login Page */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--brand-blue) 0%, #1a4a7a 50%, var(--brand-orange) 100%);
}

.login-card {
    max-width: 400px;
    width: 100%;
    margin: 1rem;
}

.login-header {
    text-align: center;
    padding: 2rem 2rem 1rem;
}

.login-header i {
    font-size: 3rem;
    color: var(--primary-color);
}

/* Notification Dropdown */
.notification-dropdown {
    width: 320px;
    max-height: 400px;
    overflow-y: auto;
}

/* Help Tooltips */
.help-icon {
    cursor: help;
    color: var(--secondary-color);
}

/* Scripture Display */
.scripture-block {
    background: #f8f9fa;
    border-left: 4px solid var(--primary-color);
    padding: 1rem 1.25rem;
    margin: 1rem 0;
    font-style: italic;
}

.scripture-reference {
    display: block;
    margin-top: 0.5rem;
    font-style: normal;
    font-weight: 600;
    color: var(--primary-color);
}

/* Print Styles */
@media print {
    .navbar, footer, .no-print {
        display: none !important;
    }
    
    main {
        padding: 0 !important;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .stat-card .stat-value {
        font-size: 1.5rem;
    }
    
    .gate-timeline::before {
        left: 18px;
    }
    
    .gate-item {
        padding-left: 55px;
    }
    
    .gate-marker {
        width: 38px;
        height: 38px;
        font-size: 1rem;
    }
}

/* Custom Animations */
@keyframes pulse {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.pulse {
    animation: pulse 2s infinite;
}

/* Phase Banner */
.phase-banner {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
}

.phase-banner h4 {
    margin: 0;
    font-weight: 600;
}

.phase-banner .days-counter {
    font-size: 2rem;
    font-weight: 700;
}

/* Awaiting Covenant Banner */
.awaiting-banner {
    background: linear-gradient(135deg, #f39c12 0%, #e74c3c 100%);
    color: white;
    padding: 2rem;
    border-radius: 0.5rem;
    text-align: center;
    margin-bottom: 1.5rem;
}

.awaiting-banner h3 {
    margin-bottom: 0.5rem;
}

.awaiting-banner p {
    margin-bottom: 0;
    opacity: 0.9;
}

/* =====================================================
 * Activity Cards
 * ===================================================== */
.activity-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.activity-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

/* Activity Step Checklist */
.activity-step-list .list-group-item {
    border-left: 3px solid transparent;
    transition: background-color 0.15s ease;
}

.activity-step-list .list-group-item:hover {
    background-color: #f8f9fa;
}

.activity-step-list .step-completed {
    border-left-color: var(--success-color);
    background-color: #f0fdf4;
}

.step-check-btn {
    text-decoration: none !important;
    border: none;
    background: none;
}

.step-check-btn:hover i {
    transform: scale(1.2);
}

/* Activity Notes Feed */
.activity-notes-feed {
    max-height: 400px;
    overflow-y: auto;
}

/* =====================================================
 * Library Cards
 * ===================================================== */
.library-card {
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.library-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
}

.library-content {
    line-height: 1.7;
}

.library-content h1, .library-content h2, .library-content h3 {
    margin-top: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--dark-color);
}

.library-content blockquote {
    border-left: 4px solid var(--primary-color);
    padding: 0.5rem 1rem;
    margin: 1rem 0;
    background: #f8f9fa;
    font-style: italic;
}

.library-content code {
    background: #f0f0f0;
    padding: 0.15rem 0.4rem;
    border-radius: 3px;
    font-size: 0.9em;
}

/* =====================================================
 * Prayer Wall
 * ===================================================== */
.prayer-card {
    border-left: 3px solid var(--primary-color);
    transition: box-shadow 0.2s ease;
}

.prayer-card:hover {
    box-shadow: 0 0.25rem 0.75rem rgba(0, 0, 0, 0.1);
}

.prayer-submit-card {
    position: sticky;
    top: 80px;
}

.prayer-btn {
    border-radius: 20px;
    padding: 0.25rem 0.75rem;
}

.prayer-btn .badge {
    font-size: 0.7rem;
}

/* =====================================================
 * Registration Form
 * ===================================================== */
.register-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--brand-blue) 0%, #1a4a7a 50%, var(--brand-orange) 100%);
}

/* =====================================================
 * Report Page
 * ===================================================== */
@media print {
    .report-header { page-break-before: always; }
}

/* =====================================================
 * Responsive: Member Portal
 * ===================================================== */
@media (max-width: 768px) {
    .prayer-submit-card {
        position: static;
    }

    .activity-notes-feed {
        max-height: 250px;
    }
}
