/* Issue Monkey — Custom Styles */
/* Brand: Navy #1B2A4A | Orange #F38A21 | Green #2E7032 | Font: Poppins */

:root {
    --im-navy: #1B2A4A;
    --im-orange: #F38A21;
    --im-green: #2E7032;
    --im-light-gray: #F5F6F8;
}

/* General */
body {
    min-height: 100vh;
    background-color: var(--im-light-gray);
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

h1, h2, h3, h4, h5, h6, .navbar-brand {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
}

/* Brand primary button override */
.btn-primary {
    background-color: var(--im-orange);
    border-color: var(--im-orange);
}
.btn-primary:hover, .btn-primary:focus {
    background-color: #e07d15;
    border-color: #e07d15;
}
.btn-outline-primary {
    color: var(--im-orange);
    border-color: var(--im-orange);
}
.btn-outline-primary:hover {
    background-color: var(--im-orange);
    border-color: var(--im-orange);
    color: #fff;
}

/* Links */
a { color: var(--im-navy); }
a:hover { color: var(--im-orange); }

/* Status badges */
.badge-open { background-color: #dc3545; }
.badge-in_progress { background-color: #ffc107; color: #000; }
.badge-resolved { background-color: #198754; }
.badge-closed { background-color: #6c757d; }

/* Issue type badges */
.badge-violation { background-color: #dc3545; }
.badge-maintenance { background-color: #0d6efd; }
.badge-safety { background-color: #ffc107; color: #000; }
.badge-other { background-color: #6c757d; }

/* Dashboard clickable cards */
.dashboard-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    cursor: pointer;
}

.dashboard-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

/* Mobile navbar — clear, readable links */
@media (max-width: 991.98px) {
    .navbar-collapse {
        background-color: var(--im-navy);
        border-radius: 0.5rem;
        padding: 1rem;
        margin-top: 0.5rem;
        border: 1px solid #495057;
    }

    .navbar-nav .nav-link {
        color: #e9ecef !important;
        padding: 0.75rem 1rem !important;
        border-bottom: 1px solid #343a40;
        font-size: 1rem;
        font-weight: 500;
    }

    .navbar-nav .nav-link:hover,
    .navbar-nav .nav-link:focus {
        color: #fff !important;
        background-color: #343a40;
        border-radius: 0.375rem;
    }

    .navbar-nav .nav-link i {
        margin-right: 0.5rem;
        width: 1.25rem;
        text-align: center;
    }

    /* Dropdown menu in mobile */
    .navbar-nav .dropdown-menu {
        background-color: #2b3035;
        border-color: #495057;
    }

    .navbar-nav .dropdown-item {
        color: #e9ecef;
        padding: 0.6rem 1rem;
    }

    .navbar-nav .dropdown-item:hover {
        background-color: #343a40;
        color: #fff;
    }

    /* Tenant name in mobile */
    .navbar-nav .nav-link.text-muted {
        color: #adb5bd !important;
        border-bottom: none;
        padding: 0.5rem 1rem !important;
        font-size: 0.85rem;
    }
}

/* Map container */
#issue-map {
    height: 500px;
    width: 100%;
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
}

/* Map on issue create form — smaller */
#pin-map {
    height: 300px;
    width: 100%;
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
    cursor: crosshair;
}

/* Photo thumbnail grid */
.photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 0.5rem;
}

.photo-grid img {
    width: 100%;
    height: 120px;
    object-fit: cover;
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
}

/* Photo upload preview */
.photo-preview {
    max-width: 200px;
    max-height: 200px;
    object-fit: cover;
    border-radius: 0.375rem;
    margin-top: 0.5rem;
}

/* Multi-photo preview row */
.photo-preview-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.photo-preview-row img {
    width: 100px;
    height: 100px;
    object-fit: cover;
    border-radius: 0.375rem;
    border: 1px solid #dee2e6;
}

/* Timeline for issue notes */
.note-timeline {
    border-left: 2px solid #dee2e6;
    padding-left: 1rem;
    margin-left: 0.5rem;
}

.note-timeline .note-item {
    position: relative;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #f0f0f0;
}

.note-timeline .note-item::before {
    content: '';
    position: absolute;
    left: -1.35rem;
    top: 0.25rem;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #0d6efd;
    border: 2px solid #fff;
}

/* Next steps prompt after issue creation */
.next-steps-card {
    border-color: #0d6efd;
    border-width: 2px;
}

.next-steps-card .card-header {
    background-color: #0d6efd;
    color: #fff;
}

/* Trial nag overlay */
#nagModal {
    z-index: 9999;
}

/* Mobile responsive tweaks */
@media (max-width: 768px) {
    #issue-map {
        height: 350px;
    }

    .photo-grid {
        grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    }

    .photo-grid img {
        height: 80px;
    }

    .photo-preview-row img {
        width: 70px;
        height: 70px;
    }
}
