/* ============================================
   RESPONSIVE.CSS - External styles only
   Mobile, tablet, desktop breakpoints
   ============================================ */

/* --- Layout utilities (replace inline styles) --- */
.logo-link {
    display: flex;
    align-items: center;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.notification-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    right: 20px;
    background: white;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.15);
    border-radius: 5px;
    padding: 15px;
    min-width: 300px;
    z-index: 1000;
    margin-top: 10px;
    max-height: 500px;
    overflow-y: auto;
}

.notification-dropdown.show {
    display: block;
}

#notificationContainer.notification-dropdown {
    display: none;
}

#notificationContainer.notification-dropdown.show {
    display: block;
}

.notification-badge.d-none {
    display: none !important;
}

.notification-title,
.notification-date,
.notification-message {
    padding-left: 15px;
}

.acknowledge-button {
    padding-left: 15px;
}

.qr-reader {
    width: 100%;
}

/* Moved from _Layout internal <style> */
#qrInput {
    font-size: 1.2em;
    margin-top: 10px;
    padding: 10px;
    border-radius: 5px;
    border: 1px solid #ced4da;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

.qr-code-container {
    text-align: center;
    margin-top: 20px;
}

.modal-md {
    max-width: 80%;
}

#chatContainer {
    background-color: #ffffff;
    height: 500px;
    overflow-y: auto;
}

.list-group {
    max-height: 500px;
}

.container {
    max-width: 96%;
}

/* Form / modal body utilities (replace inline padding/margin) */
.form-modal-body {
    padding: 0;
    margin: 0;
}

.modal-form-group {
    margin-bottom: 15px;
}

.modal-form-group:last-child {
    margin-bottom: 0;
}

.modal-buttons-spaced {
    margin-top: 15px;
}

.confirm-text {
    color: #333;
    font-size: 1rem;
    margin: 0;
}

.confirm-box {
    margin-bottom: 15px;
    padding: 10px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

.confirm-box-item {
    margin-bottom: 8px;
}

.confirm-box-item:last-child {
    margin-bottom: 0;
}

.warning-text {
    color: #dc3545;
    font-size: 0.9rem;
    margin: 0;
}

/* Filter bar utilities */
.filter-bar-inline {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-bar-inline.ml-15 {
    margin-left: 15px;
}

.filter-bar-inline.mr-15 {
    margin-right: 15px;
}

.filter-label {
    margin: 0;
    font-weight: 600;
    color: #333;
}

.date-filter-inline {
    display: none;
    align-items: center;
    gap: 10px;
}

.date-filter-inline.show {
    display: flex;
}

.date-filter-inline input[type="date"],
.date-filter-inline select {
    min-width: 150px;
}

.btn-filter {
    padding: 8px 16px;
}

.hidden-by-default {
    display: none;
}

.hidden-by-default.show {
    display: block;
}

.date-filter-form.hidden-by-default.show {
    display: flex;
}

.search-filter-bar.hidden-by-default {
    display: none;
}

.search-filter-bar.hidden-by-default.show {
    display: flex;
}

.filter-form-toggle {
    display: none;
    align-items: center;
    gap: 10px;
}

.filter-form-toggle.show {
    display: flex;
}

/* Inline form group (label + control on one line) */
.form-group-inline {
    margin-bottom: 0;
}

.form-group-inline label {
    margin-right: 10px;
}

.form-group-inline .form-control {
    display: inline-block;
    width: auto;
    margin-right: 20px;
}

.form-group-inline .form-control.w-auto {
    width: auto;
}

.btn-mr-10 {
    margin-right: 10px;
}

/* Table cell no border (for nested content) */
.td-no-padding {
    padding: 0;
    border: none;
}

/* Badge status (replaces inline badge styles) */
.badge-status {
    padding: 4px 10px;
    border-radius: 15px;
    font-size: 0.85rem;
}

.badge-status.primary {
    background-color: #007bff;
    color: white;
}

.badge-status.info {
    background-color: #17a2b8;
    color: white;
}

.badge-status.badge-danger {
    background-color: #dc3545;
    color: white;
}

.badge-status.badge-warning {
    background-color: #ffc107;
    color: white;
}

.icon-mr-5 {
    margin-right: 5px;
    color: #007bff;
}

.empty-icon {
    font-size: 3rem;
    color: #ccc;
    margin-bottom: 1rem;
}

/* Landing / footer text */
.text-muted-light {
    color: rgba(255, 255, 255, 0.7);
}

.text-muted-light a {
    color: rgba(255, 255, 255, 0.7);
}

.landing-subtext {
    margin-bottom: 20px;
    color: var(--text-light, rgba(255, 255, 255, 0.8));
}

/* Spinner */
.spinner-lg {
    width: 3rem;
    height: 3rem;
}

.spinner-lg.hidden {
    display: none;
}

.d-flex-center {
    display: flex;
    justify-content: center;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.pagination-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.modal-wide {
    max-width: 800px;
}

.photo-modal-body {
    padding: 20px;
    text-align: center;
}

.photo-modal-body img {
    max-width: 100%;
    max-height: 600px;
    border-radius: 5px;
}

.action-btn-icon-only {
    border: none;
    background: none;
    padding: 0;
}

.icon-blue {
    color: #007bff;
    font-size: 1.2rem;
}

.badge-status.badge-success {
    background-color: #28a745;
    color: white;
}

.icon-success {
    color: #28a745;
    margin-right: 5px;
}

.icon-danger {
    color: #dc3545;
    margin-right: 5px;
}

/* Alert toggles (JS shows/hides) */
.alert-toggle {
    display: none;
}

.alert-toggle.show {
    display: block !important;
}

/* Password hint */
#passwordHint.hidden,
.hidden {
    display: none !important;
}

.spinner-lg.hidden {
    display: none !important;
}

/* ============================================
   RESPONSIVE BREAKPOINTS
   ============================================ */

/* Mobile first: base is small, then scale up */

/* Extra small (phones portrait, < 576px) */
@media (max-width: 575.98px) {
    .container {
        max-width: 100%;
        padding-left: 12px;
        padding-right: 12px;
    }

    .filter-bar-inline,
    .date-filter-form {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-bar-inline.ml-15,
    .filter-bar-inline.mr-15 {
        margin-left: 0;
        margin-right: 0;
    }

    .date-filter-inline input[type="date"],
    .date-filter-inline select,
    .date-filter-form input[type="date"],
    .date-filter-form select {
        min-width: 100%;
        width: 100%;
    }

    .form-group-inline {
        margin-bottom: 10px;
    }

    .form-group-inline .form-control {
        display: block;
        width: 100%;
        margin-right: 0;
    }

    .notification-dropdown {
        left: 10px;
        right: 10px;
        min-width: auto;
        max-width: none;
    }

    #notificationContainer.notification-dropdown {
        left: 10px;
        right: 10px;
        min-width: auto;
    }

    .modal-md {
        max-width: 100%;
    }

    #chatContainer {
        height: 350px;
    }

    .list-group {
        max-height: 300px;
    }

    .qr-reader {
        min-height: 200px;
    }
}

/* Small (phones landscape, 576px – 767px) */
@media (min-width: 576px) and (max-width: 767.98px) {
    .container {
        max-width: 96%;
    }

    .notification-dropdown {
        right: 15px;
        min-width: 280px;
    }

    .modal-md {
        max-width: 90%;
    }

    #chatContainer {
        height: 400px;
    }
}

/* Medium (tablets, 768px – 991px) */
@media (min-width: 768px) and (max-width: 991.98px) {
    .container {
        max-width: 96%;
    }

    .modal-md {
        max-width: 85%;
    }

    #chatContainer {
        height: 450px;
    }

    .list-group {
        max-height: 450px;
    }
}

/* Large (desktops, 992px+) */
@media (min-width: 992px) {
    .container {
        max-width: 96%;
    }

    .modal-md {
        max-width: 80%;
    }
}

/* Extra large (large desktops, 1200px+) */
@media (min-width: 1200px) {
    .container {
        max-width: 1400px;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Landscape short (e.g. phone landscape) */
@media (orientation: landscape) and (max-height: 500px) {
    #chatContainer {
        height: 60vh;
    }

    .list-group {
        max-height: 60vh;
    }

    .modal-content {
        max-height: 90vh;
    }
}

/* Touch: larger tap targets */
@media (hover: none) and (pointer: coarse) {
    .acknowledge-button,
    .btn-filter,
    .nav-link {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
}
