/* Custom CSS — modal, cheque overlays, timeline dots, story posts */
/* Tailwind CDN handles all layout / design / color styles */

/* ── Timeline step dots ─────────────────────────────────────── */
.step-dot {
    position: absolute;
    left: -10px;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    color: white;
    font-size: 10px;
    font-weight: 800;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 0 3px white;
    z-index: 2;
}

/* ── Cheque highlight overlays ──────────────────────────────── */
.cheque-container {
    position: relative;
    display: block;
    width: 100%;
}

.highlight-box {
    position: absolute;
    border: 3px solid #ef4444;
    background-color: rgba(239, 68, 68, 0.15);
    z-index: 10;
    pointer-events: none;
    border-radius: 2px;
}

.highlight-arrow {
    position: absolute;
    color: #ef4444;
    font-size: 1.6rem;
    font-weight: 900;
    z-index: 11;
    pointer-events: none;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.5));
}

.cheque-tip {
    font-size: 0.78rem;
    color: #dc2626;
    font-weight: 700;
    text-align: center;
    padding: 0.3rem 0.6rem;
    background: #fef2f2;
    border: 1px solid #fca5a5;
    border-radius: 6px;
    margin-top: 6px;
}

/* ── Image Modal ────────────────────────────────────────────── */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0; top: 0;
    width: 100%; height: 100%;
    background-color: rgba(0, 0, 0, 0.93);
    overflow: hidden;
}

.modal-content {
    display: block;
    /* Horizontal centering via auto margins; JS controls transform (translate+scale) */
    margin: 60px auto 0;
    max-width: 82%;
    max-height: calc(100vh - 140px);
    width: auto;
    height: auto;
    object-fit: contain;
    transform-origin: center center;
    user-select: none;
    -webkit-user-drag: none;
    cursor: default;
    border-radius: 4px;
}

.close {
    position: absolute;
    top: 14px; right: 30px;
    color: rgba(255,255,255,0.7);
    font-size: 36px;
    font-weight: 300;
    cursor: pointer;
    transition: color 0.2s;
    z-index: 1001;
    line-height: 1;
}
.close:hover { color: white; }

/* ── Zoom controls ──────────────────────────────────────────── */
.zoom-controls {
    position: absolute;
    top: 14px; right: 90px;
    z-index: 1001;
    display: flex;
    gap: 6px;
}

.zoom-btn {
    background: rgba(255,255,255,0.1);
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    padding: 7px 11px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 600;
    transition: background 0.2s;
    min-width: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.zoom-btn:hover { background: rgba(255,255,255,0.2); }

/* ── Modal hint & caption ───────────────────────────────────── */
.modal-hint {
    display: block;
    margin: 10px auto 0;
    width: fit-content;
    max-width: 80%;
    background: rgba(0,0,0,0.8);
    color: rgba(255,255,255,0.8);
    padding: 0.5rem 1.1rem;
    border-radius: 20px;
    font-size: 0.78rem;
    text-align: center;
    z-index: 1002;
    opacity: 1;
    transition: opacity 0.4s ease;
    pointer-events: none;
    border: 1px solid rgba(255,255,255,0.1);
    position: relative;
}
.modal-hint.hidden { opacity: 0; }

#caption {
    display: block;
    margin: 8px auto 0;
    width: 82%;
    max-width: 760px;
    text-align: center;
    color: rgba(255,255,255,0.4);
    font-size: 0.75rem;
    padding: 0 0.5rem;
    position: relative;
}

/* ── Story form success message ─────────────────────────────── */
.success-message {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
    padding: 0.75rem 1rem;
    border-radius: 10px;
    margin-bottom: 0.75rem;
    text-align: center;
    font-weight: 700;
    font-size: 0.85rem;
}

/* ── Submitted story posts ──────────────────────────────────── */
.story-post {
    background: #f8fafc;
    padding: 1rem 1.1rem;
    border-radius: 12px;
    margin-bottom: 0.6rem;
    border-left: 3px solid #3b82f6;
    border: 1px solid #e5e7eb;
    border-left: 3px solid #3b82f6;
}
.story-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    gap: 0.4rem;
}
.story-author { font-weight: 700; color: #1e40af; font-size: 0.82rem; }
.story-meta   { font-size: 0.75rem; color: #9ca3af; }
.story-content { font-size: 0.82rem; line-height: 1.6; margin-bottom: 0.5rem; color: #374151; }
.story-details {
    font-size: 0.75rem; color: #9ca3af;
    border-top: 1px solid #f3f4f6;
    padding-top: 0.4rem;
}

/* ── Mobile ─────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .modal-content { width: 96%; max-height: 72vh; }
    #caption { width: 96%; }
    .zoom-controls { right: 8px; top: 58px; flex-direction: column; gap: 4px; }
    .zoom-btn { padding: 5px 9px; font-size: 11px; }
    .modal-hint { white-space: normal; font-size: 0.75rem; width: 88%; bottom: 80px; }
}

@media (max-width: 540px) {
    .highlight-box   { border-width: 2px; }
    .highlight-arrow { font-size: 1.3rem; }
}

/* ── Print ──────────────────────────────────────────────────── */
@media print {
    .modal, header nav, #storyForm { display: none !important; }
    body { font-size: 11pt; }
}
