/* ═══════════════════════════════════════════
   Volunteer Web-App – Mobile First Styles
   ═══════════════════════════════════════════ */

body {
    background: var(--bg);
    padding-bottom: 2rem;
}

body.modal-open {
    overflow: hidden;
    height: 100vh;
    position: fixed;
    width: 100%;
    overscroll-behavior: none;
}

/* ── Header ── */
.vol-header {
    background: linear-gradient(135deg, var(--teal) 0%, var(--teal-light) 100%);
    color: var(--text-inverse);
    padding: 0.9rem 1rem;
    position: sticky;
    top: 0;
    z-index: 50;
    box-shadow: 0 2px 12px rgba(0, 51, 51, 0.15);
}

.vol-header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    gap: 0.5rem;
}

.vol-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.vol-brand-icon { font-size: 1.5rem; }

.vol-brand-title {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    line-height: 1.2;
}

.vol-brand-sub {
    font-size: 0.65rem;
    opacity: 0.7;
    text-transform: uppercase;
    letter-spacing: 0.06em;
}

/* ── Tabs ── */
.vol-tabs {
    display: flex;
    gap: 4px;
    background: var(--bg);
    padding: 6px;
    position: sticky;
    top: 56px;
    z-index: 49;
    border-bottom: 1px solid var(--border);
}

.vol-tab {
    flex: 1;
    padding: 0.65rem 0.5rem;
    border: none;
    background: none;
    font-family: var(--font-body);
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: var(--radius-full);
    transition: all var(--transition);
    border-bottom: none;
}

.vol-tab:hover {
    color: var(--teal);
    background: rgba(0, 51, 51, 0.04);
}

.vol-tab.active {
    color: var(--teal);
    background: var(--bg-card);
    box-shadow: var(--shadow-sm);
}

/* ── Name Bar ── */
.vol-name-bar {
    background: var(--bg-card);
    border-bottom: 1px solid var(--border);
    padding: 0.75rem 1rem;
}

.vol-name-bar.hidden {
    display: none;
}

.vol-name-prompt {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
}

.vol-name-prompt .input {
    flex: 1;
    padding: 8px 12px;
    font-size: 0.85rem;
}

.vol-name-display {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 600px;
    margin: 0 auto;
    font-size: 0.85rem;
}

/* ── Sections ── */
.vol-section {
    display: none;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 0 1rem;
    box-sizing: border-box;
}

.vol-section.active {
    display: block;
}

/* ── Month Pills ── */
.month-pills {
    display: flex;
    gap: 8px;
    padding: 1rem 0 0 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.month-pills::-webkit-scrollbar { display: none; }

.month-pill {
    padding: 8px 20px;
    border-radius: var(--radius-full);
    border: 2px solid var(--border);
    background: var(--bg-card);
    font-family: var(--font-body);
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
    box-shadow: var(--shadow-sm);
}

.month-pill:hover {
    border-color: var(--teal);
    background: var(--bg-card-hover);
}

.month-pill.active {
    background: var(--teal);
    border-color: var(--teal);
    color: var(--text-inverse);
    box-shadow: 0 2px 8px rgba(0, 51, 51, 0.2);
}

/* ── Date Pills ── */
.date-pills {
    display: flex;
    gap: 6px;
    padding: 1rem 0;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
}

.date-pills::-webkit-scrollbar { display: none; }

.date-pill {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px 16px;
    border-radius: var(--radius-lg);
    border: 2px solid var(--border);
    background: var(--bg-card);
    cursor: pointer;
    transition: all var(--transition);
    flex-shrink: 0;
    min-width: 58px;
    box-shadow: var(--shadow-sm);
}

.date-pill:hover {
    border-color: var(--teal);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

.date-pill.active {
    background: var(--teal);
    border-color: var(--teal);
    color: var(--text-inverse);
    box-shadow: 0 4px 12px rgba(0, 51, 51, 0.2);
}

.date-pill.active .pill-day { color: var(--neon); }
.date-pill.active .pill-name { color: rgba(255,255,255,0.8); }

.date-pill.today {
    border-color: var(--neon);
    box-shadow: 0 0 0 2px rgba(164, 209, 82, 0.2);
}

.pill-name {
    font-size: 0.6rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
}

.pill-day {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    color: var(--teal);
    line-height: 1.3;
}

.pill-month {
    font-size: 0.6rem;
    color: var(--text-muted);
}

.pill-count {
    font-size: 0.6rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-top: 2px;
}

/* ── Shift List ── */
.vol-shift-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    padding-bottom: 2rem;
}

/* Volunteer-specific shift card tweaks */
.vol-shift-list .shift-card {
    cursor: pointer;
    border-radius: var(--radius-lg);
}

.vol-shift-list .shift-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.vol-shift-list .shift-card:active {
    transform: scale(0.98);
}

.shift-book-btn {
    margin-top: 0.75rem;
    width: 100%;
}

/* ── Role Buttons ── */
.role-buttons {
    display: flex;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.role-btn {
    flex: 1;
    padding: 12px;
    border: 2px solid var(--border);
    border-radius: var(--radius-full);
    background: var(--bg-card);
    font-family: var(--font-body);
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
    text-align: center;
}

.role-btn:hover {
    border-color: var(--teal);
}

.role-btn.active {
    border-color: var(--teal);
    background: rgba(0,51,51,0.06);
    color: var(--teal);
    box-shadow: 0 0 0 2px rgba(0, 51, 51, 0.08);
}

.btn-danger {
    background: var(--urgent);
    color: var(--text-inverse);
    font-weight: 700;
    border-radius: var(--radius-full);
}

.btn-danger:hover {
    background: #e11d48;
}

/* ── Briefing ── */
.briefing-content {
    margin: 1rem 0;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.briefing-item {
    padding: 0.6rem 0.75rem;
    background: var(--success-bg);
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
}

.emergency-box {
    background: var(--danger-bg);
    border: 1px solid var(--danger);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-top: 1rem;
}

.emergency-box a {
    color: var(--danger);
    font-weight: 700;
    text-decoration: none;
}

/* ── Report Card ── */
.report-card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    margin-bottom: 0.75rem;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition);
}

.report-card-submitted {
    padding: 0.85rem 1rem;
    border-left: 3px solid var(--success);
}

.btn-icon-edit {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all var(--transition);
    flex-shrink: 0;
}

.btn-icon-edit:hover {
    border-color: var(--teal);
    background: rgba(0,51,51,0.06);
}

.report-card h3 {
    font-family: var(--font-body);
    margin-bottom: 0.75rem;
}

.report-input-group {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

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

/* ── Empty State ── */
.vol-empty-state {
    text-align: center;
    padding: 3rem 1rem;
    color: var(--text-muted);
}

.vol-empty-state p {
    margin-top: 0.5rem;
    font-size: 0.9rem;
}

/* ── Cancel Button ── */
.cancel-booking-btn {
    margin-top: 0.5rem;
    width: 100%;
}

/* ── User Chip ── */
.vol-user-chip {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.65rem;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: all var(--transition);
    max-width: 120px;
}

.vol-user-chip:hover {
    background: rgba(255,255,255,0.18);
    border-color: var(--neon);
    box-shadow: 0 0 0 2px rgba(164, 209, 82, 0.2);
}

.user-chip-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-inverse);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.user-chip-icon {
    font-size: 0.8rem;
    background: var(--neon);
    color: var(--teal);
    width: 18px;
    height: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.btn-round {
    border-radius: var(--radius-full) !important;
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

/* ── FAQ Accordion ── */
.faq-list {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: left;
}

.faq-item {
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: background var(--transition), border-color var(--transition), box-shadow var(--transition);
}

.faq-item[open] {
    background: #ffffff;
    border-color: var(--teal);
    box-shadow: var(--shadow);
}

.faq-item summary {
    padding: 1rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    list-style: none;
    color: var(--teal);
}

.faq-item summary::-webkit-details-marker { display: none; }

.faq-item summary::after {
    content: '＋';
    font-size: 1.1rem;
    font-weight: 400;
    transition: transform 0.2s;
}

.faq-item[open] summary::after {
    content: '✕';
    transform: rotate(90deg);
}

.faq-content {
    padding: 0 1rem 1rem 1rem;
    font-size: 0.85rem;
    line-height: 1.6;
    color: var(--text-secondary);
}

.faq-content h4 {
    color: var(--teal);
    margin: 1rem 0 0.5rem 0;
    font-size: 0.85rem;
}

.faq-content p { margin-bottom: 0.75rem; }

.faq-content ul {
    padding-left: 1.2rem;
    margin-bottom: 0.75rem;
}

.faq-content li { margin-bottom: 0.4rem; }

/* ── Onboarding Overlay ── */
.onboarding-card {
    text-align: center;
    padding: 2.5rem 2rem;
    background: var(--bg-card);
    border-radius: var(--radius-xl);
    box-shadow: 0 24px 48px rgba(0,0,0,0.20), 0 8px 16px rgba(0,0,0,0.08);
}

.onboarding-welcome {
    font-size: 3.5rem;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 12px rgba(164, 209, 82, 0.5));
}

.onboarding-form {
    margin-top: 2rem;
    text-align: left;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.onboarding-form .input {
    height: 3.5rem;
    font-size: 1.05rem;
    border-radius: var(--radius-full);
    background: #ffffff;
    border: 2px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.onboarding-form .input:focus {
    border-color: var(--teal);
    box-shadow: 0 0 0 3px rgba(0, 51, 51, 0.08);
}

/* Experience Level Pills */
.experience-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 6px;
}

.exp-pill {
    padding: 7px 14px;
    border-radius: var(--radius-full);
    border: 2px solid var(--border);
    background: var(--bg-card);
    font-family: var(--font-body);
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    transition: all var(--transition);
    white-space: nowrap;
}

.exp-pill:hover {
    border-color: var(--teal);
    color: var(--text-primary);
}

.exp-pill.active {
    background: var(--teal);
    border-color: var(--teal);
    color: var(--text-inverse);
    box-shadow: 0 2px 8px rgba(0, 51, 51, 0.2);
}

.input-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.checkbox-container {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    cursor: pointer;
    user-select: none;
}


.checkbox-container input {

    width: 22px;
    height: 22px;
    margin-top: 2px;
    flex-shrink: 0;
    cursor: pointer;
    border-radius: 4px;
    border: 2px solid var(--border);
    accent-color: var(--teal);
    transition: all var(--transition);
}

.checkbox-container input:hover {
    border-color: var(--teal);
}

.checkbox-label {
    font-size: 0.9rem;
    line-height: 1.4;
    color: var(--text-secondary);
    padding-top: 1px;
}


.captcha-box {
    transition: all var(--transition);
}

.captcha-box:focus-within {
    border-color: var(--teal);
    background: rgba(255,255,255,0.08);
}


/* ── Score Dots & Avatars ── */
.score-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 5px;
}
.score-dot.score-5 { background: #22c55e; box-shadow: 0 0 8px #22c55e; }
.score-dot.score-4 { background: #84cc16; box-shadow: 0 0 8px #84cc16; }
.score-dot.score-3 { background: #f59e0b; box-shadow: 0 0 8px #f59e0b; }
.score-dot.score-2 { background: #f97316; box-shadow: 0 0 8px #f97316; }
.score-dot.score-1 { background: #ef4444; box-shadow: 0 0 8px #ef4444; }

.team-display {
    display: flex;
    gap: 4px;
    margin-top: 0.5rem;
}

.team-avatar {
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background: var(--teal);
    color: var(--neon);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 0.7rem;
    font-weight: 700;
    border: 2px solid var(--bg-card);
    position: relative;
    transition: transform var(--transition);
    box-shadow: var(--shadow-sm);
}

.team-avatar.empty {
    background: var(--bg-input);
    color: var(--text-muted);
    border: 2px dashed var(--border);
}

.team-avatar:hover {
    transform: translateY(-2px);
    z-index: 10;
}

/* ── Emergency Buttons ── */
.emergency-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-top: 0.75rem;
}

.emergency-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.75rem;
    text-decoration: none;
    border-radius: var(--radius);
    transition: all var(--transition);
}

.emergency-btn:hover {
    background: var(--danger-bg);
    border-color: var(--danger);
}

.emergency-btn span {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    opacity: 0.7;
}

.emergency-btn strong {
    font-size: 1.1rem;
    color: var(--danger);
}

/* ── Badge Sync ── */
.badge-kvr {
    background: #16a34a;
    color: white;
    font-weight: 700;
}

.missing-badge {
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-input);
    padding: 4px 10px;
    border-radius: var(--radius-full);
}

.missing-badge strong {
    color: var(--teal);
}

/* ── Desktop Adjustments ── */
@media (min-width: 768px) {
    .vol-tabs {
        max-width: 600px;
        margin: 0 auto;
    }
}

@media (max-width: 420px) {
    .vol-brand-sub {
        display: none;
    }
    .vol-brand-title {
        font-size: 0.85rem;
    }
    #open-briefing {
        font-size: 0.65rem;
        padding: 4px 8px;
    }
    .vol-user-chip {
        max-width: 80px;
    }
}

/* ── FAB (Floating Action Button) ── */
.fab {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--neon);
    color: var(--teal);
    border: none;
    box-shadow: 0 6px 20px rgba(164, 209, 82, 0.4), 0 2px 8px rgba(0,0,0,0.12);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100;
    transition: all var(--transition);
}

.fab:hover {
    transform: scale(1.08) rotate(3deg);
    box-shadow: 0 10px 28px rgba(164, 209, 82, 0.5), 0 4px 12px rgba(0,0,0,0.15);
}

.fab:active {
    transform: scale(0.95);
}

.fab-icon {
    font-size: 1.8rem;
}

/* ── Reporting Feedback Textarea ── */
.report-feedback-group {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border);
}

.report-feedback-group .label {
    font-size: 0.75rem;
    margin-bottom: 0.4rem;
    display: block;
    color: var(--text-muted);
}

.report-feedback-group textarea {
    width: 100%;
    min-height: 80px;
    padding: 10px;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--bg-input);
    color: var(--text);
    resize: vertical;
    font-family: var(--font-body);
}

.report-feedback-group textarea:focus {
    border-color: var(--teal);
    outline: none;
    background: #ffffff;
}

/* ── Photo Upload ── */
.report-upload-group {
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px dashed var(--border);
}

.upload-btn-container {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.upload-preview {
    width: 100%;
    max-height: 200px;
    object-fit: cover;
    border-radius: var(--radius-sm);
    display: none;
    margin-top: 0.5rem;
}

.btn-upload {
    background: var(--bg-input);
    color: var(--teal);
    border: 2px dashed var(--teal);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition);
}

.btn-upload:hover {
    background: rgba(0,51,51,0.04);
}

.btn-upload i { font-size: 1.2rem; }

.upload-status {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    display: block;
}

.upload-status.success { color: var(--success); font-weight: 600; }
.upload-status.error { color: var(--urgent); }

/* ── Overflow Booking (Soft Cap) ── */
.shift-card-full {
    opacity: 0.75;
    border-style: dashed;
    cursor: default;
}

.shift-card-full:active {
    transform: none !important;
}

.shift-overflow-btn {
    margin-top: 0.75rem;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    font-weight: 600;
    font-size: 0.85rem;
    padding: 0.6rem 1rem;
    border: 2px dashed var(--teal);
    color: var(--teal);
    background: rgba(0, 51, 51, 0.04);
    border-radius: var(--radius);
    cursor: pointer;
    transition: all var(--transition);
}

.shift-overflow-btn:hover {
    background: rgba(0, 51, 51, 0.1);
    border-style: solid;
    opacity: 1;
}

/* ── Create Shift Form ── */
.create-shift-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.create-shift-form .input {
    font-size: 0.95rem;
    -webkit-appearance: none;
    appearance: none;
}

.create-shift-time-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.create-shift-plz-row {
    display: flex;
    gap: 1rem;
}

.create-shift-btn-row {
    display: flex;
    gap: 0.5rem;
    margin-top: 1.5rem;
}

@media (max-width: 480px) {
    .create-shift-form .input {
        padding: 10px 14px !important;
        font-size: 0.85rem !important;
        min-width: 0 !important;
        width: 100% !important;
        height: auto !important;
        box-sizing: border-box !important;
    }
    
    /* Stack Start and Ende vertically on mobile to avoid pill overflow */
    .create-shift-time-row {
        display: flex !important;
        flex-direction: column !important;
        gap: 0.75rem !important;
    }
    
    .create-shift-plz-row {
        gap: 0.5rem !important;
    }
    
    /* Stack buttons vertically on mobile to ensure the text fits */
    .create-shift-btn-row {
        flex-direction: column !important;
        gap: 0.75rem !important;
    }
    
    .modal {
        padding: 1.25rem !important;
        width: 100% !important;
        margin: 0 !important;
        border-radius: var(--radius-lg) !important;
    }
}
