﻿/* ==========================================
   COLOR VARIABLES (Edit colors here!)
========================================== */
:root {
    --sage: #4a635d;
    --sage-dark: #3c504b;
    --cream: #f1e8d9;
    --gold: #caa85a;
    --footer-dark: #3a4945;
    --text-dark: #2e2e2e;
    --bg-light: #f7f8f5;
}

/* ==========================================
   BASE PAGE STYLE
========================================== */
body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--bg-light);
    color: var(--text-dark);
}

/* ==========================================
   NAVBAR
========================================== */
.navbar {
    background-color: var(--sage);
}

.navbar-brand {
    font-family: 'Playfair Display', serif;
    font-size: 1.75rem;
    color: var(--cream) !important;
}

    .navbar-brand .brand-highlight {
        color: var(--gold);
    }

.nav-link {
    color: var(--cream) !important;
    transition: color 0.2s ease-in-out;
}

    .nav-link:hover {
        color: #fff !important;
    }

/* Dropdown */
.navbar .dropdown-toggle {
    color: var(--cream) !important;
}

.navbar .dropdown-menu {
    background-color: var(--sage);
}

.navbar .dropdown-item {
    color: var(--cream);
}

    .navbar .dropdown-item:hover {
        background-color: var(--sage-dark);
    }

    /* Logout link */
    .navbar .dropdown-item.logout-link {
        color: var(--cream);
        font-weight: 500;
    }

        .navbar .dropdown-item.logout-link:hover {
            background-color: var(--gold);
            color: #2f2f2f;
        }

/* ==========================================
   MAIN CONTENT
========================================== */
.content-wrapper {
    min-height: 80vh;
    padding-top: 2rem;
    padding-bottom: 2rem;
}

/* ==========================================
   FOOTER
========================================== */
footer {
    background-color: var(--footer-dark);
    color: #dcdcdc;
    font-size: 0.9rem;
    padding: 1.5rem 0;
}

    footer a {
        color: #dcdcdc;
    }

        footer a:hover {
            text-decoration: underline;
        }

/* ==========================================
   BUTTONS
========================================== */
.btn-primary {
    background-color: var(--sage);
    border-color: var(--sage);
}

    .btn-primary:hover {
        background-color: var(--sage-dark);
        border-color: var(--sage-dark);
    }

/* ==========================================
   CARDS
========================================== */
.card {
    border: none;
    border-radius: 1rem;
    box-shadow: 0 3px 10px rgba(0, 0, 0, 0.08);
}

.card-header {
    background-color: var(--sage);
    color: var(--cream);
    font-weight: 500;
}

/* Pretty hover for dashboard cards */
.action-card:hover {
    transform: translateY(-4px);
    transition: 0.2s ease;
    box-shadow: 0px 6px 20px rgba(0,0,0,0.12);
}

/* ==========================================
   ANIMATIONS
========================================== */
.fade-panel {
    animation: fadeIn 0.2s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-out {
    opacity: 1;
    transition: opacity 0.5s ease-out;
}

    .fade-out.hidden {
        opacity: 0;
    }

/* ==========================================
   SCROLLABLE TABLES
========================================== */
.scroll-table {
    max-height: 500px;
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: 8px;
}

    .scroll-table th {
        position: sticky;
        top: 0;
        background: #f8f9fa;
        z-index: 2;
    }

/* ==========================================
   UPLOAD DROPZONE
========================================== */
.upload-dropzone {
    border: 2px dashed #6c757d;
    border-radius: 8px;
    padding: 30px;
    text-align: center;
    cursor: pointer;
    color: #6c757d;
    transition: 0.3s;
}

    .upload-dropzone.dragover {
        background-color: #eef6ff;
        border-color: #0d6efd;
        color: #0d6efd;
    }

.preview-thumb {
    width: 120px;
    margin: 8px;
    border-radius: 6px;
}

.primary-badge {
    position: absolute;
    background: #ffc107;
    color: #000;
    padding: 3px 6px;
    font-size: 12px;
    border-radius: 4px;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 24px;
}

    .switch input {
        opacity: 0;
        width: 0;
        height: 0;
    }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .3s;
    border-radius: 34px;
}

    .slider:before {
        position: absolute;
        content: "";
        height: 18px;
        width: 18px;
        left: 3px;
        bottom: 3px;
        background-color: white;
        transition: .3s;
        border-radius: 50%;
    }

input:checked + .slider {
    background-color: #4a635d;
}

    input:checked + .slider:before {
        transform: translateX(22px);
    }

/* ============================================================
   ATTACHMENT UI — CLEANED & CONSOLIDATED
   (Photos + Documents)
============================================================ */

/* ---- Wrapper for each photo or document tile ---- */
.photo-wrapper,
.file-wrapper {
    position: relative;
    display: inline-block;
    vertical-align: top;
    margin: 8px;
    width: 225px; /* consistent tile width */
}

/* ---- Images (photos) ---- */
.photo-thumb {
    width: 225px;
    height: auto;
    cursor: pointer;
    border-radius: 6px;
}

/* ---- Document thumbnails ---- */
.file-thumb {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 6px;
}

/* ---- Primary Badge ---- */
.primary-badge {
    position: absolute;
    top: 6px;
    left: 6px;
    background: #ffc107;
    color: #000;
    padding: 3px 6px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    z-index: 5;
}

.photo-thumb.img-thumbnail {
    padding: 0 !important;
    border: none !important;
}

/* ---- Options button (⋮) ---- */
.photo-options-btn,
.file-options-btn {
    position: absolute;
    top: 6px;
    right: 6px;
    padding: 2px 6px;
    font-size: 16px;
    border: 1px solid #ccc;
    border-radius: 6px;
    background: white;
    cursor: pointer;
    z-index: 10;
}

    .photo-options-btn:hover,
    .file-options-btn:hover {
        background: #f0f0f0;
    }

/* ---- Action buttons row ---- */
.photo-actions,
.file-actions {
    display: flex;
    flex-direction: row; /* ONE LINE */
    gap: 4px;
    margin-top: 6px;
}

/* ---- Action icons ---- */
.icon-btn {
    width: 28px;
    height: 28px;
    padding: 0;
    font-size: 16px;
    text-align: center;
    line-height: 28px;
    border-radius: 6px;
}

/* ---- Description preview ---- */
.photo-description,
.file-description {
    margin-top: 4px;
    font-size: 0.85rem;
    color: #6c757d;
    max-width: 150px;
    text-overflow: ellipsis;
    overflow: hidden;
    white-space: nowrap;
}

/* ======================== 
FILTER DROPDOWNS
========================*/
.filter-no-results {
    border-color: #cc0000 !important;
    background-color: #ffe6e6 !important;
    color: #660000 !important;
}

/* ======================== 
ITEM LINKS
========================*/
.item-link {
    color: #2c4f63;
    font-weight: 500;
    text-decoration: none;
}

    .item-link:hover {
        text-decoration: underline;
        color: #1b3442;
    }