/* Shared presentation for public attendance forms and confirmation. */
.attendance-page {
    background: linear-gradient(145deg, #eff6ff, #f8fafc 55%, #ecfdf5);
}

.attendance-page > .min-vh-100 {
    display: block !important;
    padding: 0 !important;
    min-height: 100svh !important;
}

.attendance-page > .min-vh-100 > .container {
    width: 100%;
    max-width: none;
    padding: 0;
}

.attendance-page .public-shell,
.attendance-page .preview-shell {
    width: 100%;
    max-width: none;
    min-height: 100vh;
    min-height: 100svh;
    margin: 0;
    padding: clamp(12px, 2.2vw, 40px);
    padding-bottom: max(24px, env(safe-area-inset-bottom));
    overflow-wrap: anywhere;
}

.attendance-page .page-stack {
    gap: 16px;
}

.attendance-page .card {
    border-radius: 20px;
    border-color: #e2e8f0;
    box-shadow: 0 8px 28px rgba(15, 23, 42, .06) !important;
}

.attendance-page .card .card-body {
    padding: clamp(18px, 2vw, 32px);
    min-width: 0;
}

.attendance-page .hero-card {
    border: 0;
    background: linear-gradient(120deg, #0f172a, #1e40af 65%, #0f766e);
}

.attendance-page .hero-card h4,
.attendance-page .hero-card h5 {
    font-size: clamp(1.3rem, 2vw, 2rem);
    font-weight: 700;
    line-height: 1.35;
}

.attendance-page .hero-card .text-truncate {
    white-space: normal;
    overflow: visible;
}

.attendance-page .hero-card .participant-pill {
    background: rgba(255, 255, 255, .18);
    color: #fff;
}

.attendance-page .form-label,
.attendance-page .section-title {
    font-weight: 600;
    color: #334155;
    font-size: .95rem;
}

.attendance-page .form-control,
.attendance-page .form-select {
    min-height: 48px;
    border-radius: 12px;
    font-size: 16px;
}

.attendance-page .form-control:focus,
.attendance-page .form-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, .16);
}

.attendance-page .btn {
    min-height: 44px;
    border-radius: 12px;
    padding: .65rem 1rem;
    font-weight: 600;
    white-space: normal;
}

.attendance-page .signature-wrap {
    padding: 12px;
}

.attendance-page #signatureCanvas {
    height: clamp(180px, 25vh, 280px);
}

.attendance-page .info-value,
.attendance-page .summary-value {
    line-height: 1.6;
}

.attendance-page .row > * {
    min-width: 0;
}

@media (min-width: 768px) and (max-width: 1199.98px) {
    .attendance-page form .col-md-3,
    .attendance-page form .col-md-4 {
        width: 50%;
    }

    .attendance-page #attendanceForm .col-md-8 {
        width: 100%;
    }
}

@media (max-width: 575.98px) {
    .attendance-page .card {
        border-radius: 16px;
    }

    .attendance-page .signature-wrap > .d-flex,
    .attendance-page #attendanceForm > .d-flex {
        flex-direction: column;
        align-items: stretch !important;
    }

    .attendance-page #attendanceForm > .d-flex > .btn {
        width: 100%;
    }

    .attendance-page .modal-dialog {
        margin: 12px;
    }
}

/* Customize scrollbar to ensure it is visible and clear on mobile */
::-webkit-scrollbar {
    width: 12px;
    height: 12px;
}
::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-left: 1px solid #e2e8f0;
}
::-webkit-scrollbar-thumb {
    background: #94a3b8;
    border-radius: 6px;
    border: 2px solid #f1f5f9;
}
::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* For Firefox */
* {
    scrollbar-width: auto;
    scrollbar-color: #94a3b8 #f1f5f9;
}
