
.maxwidth {
    width: 100%;
}

/* Bootstrap 5 defaults navbar horizontal padding to 0; restore v4 spacing */
.navbar-smap {
	--bs-navbar-padding-x: 1rem;
	padding-left: 1rem;
	padding-right: 1rem;
}

/* Bootstrap 5 dropped .form-group spacing used in legacy forms */
.form-group {
	margin-bottom: 1rem;
}

tr.deleted td a {
    color: red !important;
}

.blocked {
    opacity: 0.5;
}

.readonlysurvey {
    color: rebeccapurple !important;
}

.oversightsurvey {
    color: #f18314 !important;
}

.hideondevice {
    color: rgba(241, 20, 223, 0.95) !important;
}

.reversed {
    color: #ccc;
}

#map {
    width: 100%;
    height: 500px;
}

.bg-rejected {
    background-color: #8B4513 !important;
    color: white
}

.cell-is-deleted {
    background-color: #FADBD8 !important;
    color: #922B21 !important;
}

/* ============================================================
   Panel card header & action buttons
   Used by fieldAnalysis dashboard and managed_forms chart panels
   ============================================================ */

.panel-header {
    padding: 0.35rem 0.75rem;
    background: #f8f9fa;
    border-bottom: 1px solid rgba(0,0,0,.1);
    min-height: 2.25rem;
}

.panel_title {
    font-size: 0.8rem;
    font-weight: 600;
    color: #495057;
    letter-spacing: 0.02em;
    min-width: 0;
}

.panel-actions {
    display: flex;
    align-items: center;
    gap: 1px;
    opacity: 0;
    transition: opacity 0.15s;
}

.card:hover .panel-actions {
    opacity: 1;
}

.panel-btn {
    background: none;
    border: none;
    color: #6c757d;
    width: 1.75rem;
    height: 1.75rem;
    padding: 0;
    border-radius: 0.25rem;
    cursor: pointer;
    font-size: 0.75rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s, background 0.15s;
}

.panel-btn:hover {
    color: #212529;
    background: rgba(0,0,0,0.08);
}

.panel-btn-danger:hover {
    color: #dc3545;
    background: rgba(220,53,69,0.1);
}

.filtersChanged .nav-link {
    color: #dc3545;
    font-weight: 700;
}

.nav-tabs .nav-link:not(.active) {
    color: #0a58ca;
}

.nav-tabs .nav-link:not(.active):hover {
    color: #084298;
}

.chart-header.card-header {
    padding-top: 0.1rem;
    padding-bottom: 0.1rem;
}

.wide-chart {
    position: relative;
    height:40vh;
    width:80vw;
}

.email_options {
    background-color: whitesmoke;
    padding: 10px;
}

::placeholder {
    color: #767676;
}

.conv-from.sms {
    background-color: #0a6fae;
    color: white;
}

.conv-to.sms {
    background-color: #7993a3;
    color: black;
}

.conv-from.whatsapp {
    background-color: #25d366;
    color: white;
}

.conv-to.whatsapp {
    background-color: #dcf8c6;
    color: black;
}

.conv-from.email {
    background-color: #987554;
    color: white;
}

.conv-to.email {
    background-color: #e5d3b3;
    color: black;
}

.message time, .message dest {
    font-size: 11px;
    color: #333;
    line-height: 1;
}

/* WCAG 2.2 AA focus indicators — Bootstrap suppresses outline on .btn and uses box-shadow,
   but unstyled .btn (no variant) has no shadow colour set so focus is invisible.        */
.survey_replace:focus-visible,
.survey_view:focus-visible,
.pdf_td:focus-visible {
    outline: 3px solid #0d6efd;
    outline-offset: 2px;
    box-shadow: none;
}

/* WCAG 2.2 AA contrast fixes — Bootstrap 5 defaults fail 4.5:1 with white text */
/* btn-success #198754 = ~4.5:1; btn-danger #dc3545 = ~4.3:1. Use darker shades.     */
/* Disabled state: Bootstrap applies opacity:0.65 which kills contrast on both text   */
/* and bg. Override to opacity:1 and use a lighter-but-still-passing shade instead.   */
.btn-success {
    --bs-btn-bg: #146c43;
    --bs-btn-border-color: #146c43;
    --bs-btn-hover-bg: #0f5132;
    --bs-btn-hover-border-color: #0f5132;
    --bs-btn-active-bg: #0f5132;
    --bs-btn-active-border-color: #0f5132;
    --bs-btn-disabled-bg: #d1e7dd;        /* light green bg + dark text: clearly muted */
    --bs-btn-disabled-border-color: #a3cfbb;
    --bs-btn-disabled-color: #0f5132;
    --bs-btn-disabled-opacity: 1;
}
.btn-danger {
    --bs-btn-bg: #b02a37;
    --bs-btn-border-color: #b02a37;
    --bs-btn-hover-bg: #8b1f2a;
    --bs-btn-hover-border-color: #8b1f2a;
    --bs-btn-active-bg: #8b1f2a;
    --bs-btn-active-border-color: #8b1f2a;
    --bs-btn-disabled-bg: #f8d7da;        /* light red bg + dark text: clearly muted */
    --bs-btn-disabled-border-color: #f1aeb5;
    --bs-btn-disabled-color: #842029;
    --bs-btn-disabled-opacity: 1;
}

.email time, .email dest {
    font-size: 11px;
    color: #333;
    line-height: 1;
}

input.ldirn {
    width: 1.5rem;
    height: 1.5rem;
    cursor: pointer;
}
