/* Dropdown-like styling for searchable inputs */
.dropdown-input {
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

/* Increase specificity to avoid overrides */
input.form-control.dropdown-input,
textarea.form-control.dropdown-input,
select.form-control.dropdown-input {
  background-image: url('data:image/svg+xml,%3csvg xmlns="http://www.w3.org/2000/svg" width="16" height="16" fill="currentColor" class="bi bi-caret-down-fill" viewBox="0 0 16 16"%3e%3cpath d="M7.247 11.14 2.451 5.658C1.885 5.013 2.345 4 3.204 4h9.592c.86 0 1.319 1.013.753 1.658l-4.796 5.482a1 1 0 0 1-1.506 0z"/%3e%3c/svg%3e') !important;
  background-repeat: no-repeat !important;
  background-position: right .75rem center !important;
  background-size: 16px 12px !important;
  padding-right: 2rem !important;
}

body, .form-control, .table, .modal-content, .btn, h3 {
    font-size: 1rem;
}
h3 {
    font-size: 1.25rem;
}

.btn + .btn {
    margin-left: 0.5rem;
}

.table, .table td, .table th {
    font-size: 1rem !important; /* or 14px */
    vertical-align: middle;
    padding: 0.5rem;
}

.table td .btn {
    display: inline-block;
    margin-bottom: 2px;
}

.progress {
    height: 24px;
}

.bi {
    font-size: 1.2rem;
    vertical-align: middle;
}

.modal-lg {
    max-width: 900px;
}

.btn-light-green {
    background-color: #90ee90 !important; /* Light green */
    color: #155724 !important;
    border-color: #90ee90 !important;
}
.btn-light-green:hover {
    background-color: #7ed87e !important;
    color: #155724 !important;
}


/* Styles for fixed table layout */
.fixed-table-layout {
    table-layout: fixed; /* Forces columns to respect specified widths */
    width: 100%; /* Ensures the table spans the full width of its container */
}

    .fixed-table-layout th,
    .fixed-table-layout td {
        overflow: hidden; /* Hides content that overflows the cell */
        text-overflow: ellipsis; /* Adds "..." to text that overflows */
        white-space: nowrap; /* Prevents text from wrapping to the next line */
        word-break: break-word; /* Allows long words to break if they don't fit */
    }

        /* Adjust specific column widths as needed */
        /* The widths on the <th> elements take precedence, but these can be used for fine-tuning */
        .fixed-table-layout th:nth-child(1), .fixed-table-layout td:nth-child(1) { /* Serial Number */
            /* width: 15%; */ /* Already set inline on th, keeping for reference */
        }

@media print {
    .dt-no-print {
        display: none !important;
    }

    .dt-print-only {
        display: block !important;
    }

    /* Hide everything except the detail container when printing from the MAIN page.
       The print popup window has class 'print-window' on <body> — skip these rules
       there because the popup already contains only the content to print. */
    body:not(.print-window) * {
        visibility: hidden;
    }

    body:not(.print-window) #survey-detail-print,
    body:not(.print-window) #survey-detail-print *,
    body:not(.print-window) #maintenance-detail-print,
    body:not(.print-window) #maintenance-detail-print * {
        visibility: visible;
    }

    body:not(.print-window) #survey-detail-print,
    body:not(.print-window) #maintenance-detail-print {
        position: absolute;
        left: 0;
        top: 0;
        width: 100%;
    }

    /* Allow wrapping in the Survey Signals table in print so long text isn't cut off */
    .survey-signals-table th,
    .survey-signals-table td {
        white-space: normal !important;
        word-break: break-word;
    }

    /* Ensure long text values in detail tables wrap instead of being truncated */
    #survey-detail-print table.table th,
    #survey-detail-print table.table td,
    #maintenance-detail-print table.table th,
    #maintenance-detail-print table.table td {
        white-space: normal !important;
        word-break: break-word;
        overflow: visible !important;
        text-overflow: clip !important;
    }

    /* Also allow long values in meta sections to wrap cleanly */
    #survey-detail-print .card-body .fw-semibold,
    #maintenance-detail-print .card-body .fw-semibold {
        word-break: break-word;
    }
}

/* By default, show interactive controls and hide print-only blocks */
.dt-print-only {
    display: none;
}

/* Multiline survey field cells (comments/notes/observations/details) */
.survey-multiline {
    white-space: pre-line !important;
    word-break: break-word;
}

/* Maintenance completion indicator in summary card */
.maintenance-status-indicator .status-dot {
    width: 10px;
    height: 10px;
    display: inline-block;
    flex: 0 0 10px;
    border: 1px solid rgba(0, 0, 0, 0.15);
}

/* Ensure colored status dot is preserved in browser print/PDF output */
@media print {
    #maintenance-detail-print .maintenance-status-indicator .status-dot {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}

/* GSM Signal Readings table tweaks */
.survey-signals-table th:nth-child(1),
.survey-signals-table td:nth-child(1) {
    min-width: 56px;
    width: 56px;
    white-space: nowrap !important;
}

/* Keep long comments multiline and wrapped */
.survey-signals-table th:nth-child(8),
.survey-signals-table td:nth-child(8) {
    white-space: pre-wrap !important;
    word-break: break-word;
}

.fixed-table-layout th:nth-child(2), .fixed-table-layout td:nth-child(2) { /* Site */
    /* width: 20%; */
}
/* ... and so on for other columns if you prefer centralizing styles */

/* Make survey card headers slightly larger/smoother than field text */
#survey-detail-print .card-header .card-title {
    font-size: 1.05rem;
    font-weight: 600;
}

/* Enlarge main survey report heading and subtitle inside print area */
#survey-detail-print .survey-report-title {
    font-size: 1.2rem;
    font-weight: 600;
}

#survey-detail-print .survey-report-subtitle {
    font-size: 1.05rem;
    font-weight: 500;
}

/* Enlarge the modal title that shows the concatenated site name + meter */
.survey-detail-modal .modal-title {
    font-size: 1.25rem;
    font-weight: 600;
}