/* Data Table Styles
   Extracted from wwtg.php and wwbridges.php
   ================================================== */

.data-table {
    vertical-align: middle;
    text-align: center;
    empty-cells: show;
    padding-left: 0px;
    padding-right: 0px;
    padding-top: 0px;
    padding-bottom: 0px;
    border-collapse: collapse;
    border-color: #000000;
    border-style: solid;
    border-spacing: 4px;
    border-width: 2px;
    text-decoration: none;
    color: #ffffff;
    background: #000000;
    font-family: verdana, arial, sans-serif;
    width: 100%;
    white-space: nowrap;
}

.data-table th {
    font-family: "Lucidia Console", monospace;
    font-weight: bolder;
    text-shadow: 1px 1px #8b0000;
    text-decoration: none;
    background: #091b33;
    border: 1px solid #c0c0c0;
    transition: background-color 0.2s ease;
}

.data-table th:hover {
    background: #0d2447;
}

.data-table tr:nth-child(even) {
    background: #f7f7f7;
    transition: background-color 0.2s ease;
}

.data-table tr:nth-child(odd) {
    background: #d0d0d0;
    transition: background-color 0.2s ease;
}

.data-table tr:hover {
    background: #e8f4f8 !important;
}

.data-table td {
    color: #000000;
    font-family: "Lucidia Console", monospace;
    font-weight: bolder;
    text-decoration: none;
    border: 1px solid #000000;
}

/* Responsive Styles */

.responsive {
    width: 100%;
    height: auto;
}


/* Fix browser autofill yellow background with unreadable white text
   Adapts to both light and dark modes
   ================================================== */

/* Light mode - white background with dark text */
.light-mode input:-webkit-autofill,
.light-mode input:-webkit-autofill:hover,
.light-mode input:-webkit-autofill:focus,
.light-mode input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #ffffff inset !important;
    -webkit-text-fill-color: #495057 !important;
}

/* Dark mode - dark background with light text */
.dark-mode input:-webkit-autofill,
.dark-mode input:-webkit-autofill:hover,
.dark-mode input:-webkit-autofill:focus,
.dark-mode input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #343a40 inset !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Fix bulletin board colored row backgrounds - force readable text
   Override Bootstrap table-* classes from monitor container
   ================================================== */

/* Blue backgrounds - need DARK text */
#bulletin table tbody tr.table-info,
#bulletin table tbody tr.table-info td,
#bulletin table tbody tr.table-info th {
    background-color: #17a2b8 !important;
    color: #000000 !important;
}

/* Green backgrounds - need DARK text */
#bulletin table tbody tr.table-success,
#bulletin table tbody tr.table-success td,
#bulletin table tbody tr.table-success th {
    background-color: #28a745 !important;
    color: #000000 !important;
}

/* Red backgrounds - need DARK text */
#bulletin table tbody tr.table-danger,
#bulletin table tbody tr.table-danger td,
#bulletin table tbody tr.table-danger th {
    background-color: #dc3545 !important;
    color: #000000 !important;
}

/* Yellow backgrounds - need DARK text */
#bulletin table tbody tr.table-warning,
#bulletin table tbody tr.table-warning td,
#bulletin table tbody tr.table-warning th {
    background-color: #ffc107 !important;
    color: #000000 !important;
}

/* Gray backgrounds - need DARK text */
#bulletin table tbody tr.table-secondary,
#bulletin table tbody tr.table-secondary td,
#bulletin table tbody tr.table-secondary th {
    background-color: #6c757d !important;
    color: #000000 !important;
}

/* Badges - dark text on all colored backgrounds */
#bulletin .badge.bg-info {
    background-color: #17a2b8 !important;
    color: #000000 !important;
}

#bulletin .badge.bg-success {
    background-color: #28a745 !important;
    color: #000000 !important;
}

#bulletin .badge.bg-danger {
    background-color: #dc3545 !important;
    color: #000000 !important;
}

#bulletin .badge.bg-warning {
    background-color: #ffc107 !important;
    color: #000000 !important;
}

#bulletin .badge.bg-secondary {
    background-color: #6c757d !important;
    color: #000000 !important;
}

/* Motorola IPSC repeaters — distinct from green MMDVM pills */
.badge-ipsc {
    background-color: #ff6600;
    color: #fff;
}

a.badge-ipsc:hover,
a.badge-ipsc:focus {
    color: #fff;
    opacity: 0.92;
}

.dark-mode .main-footer a {
    color: #c2c7d0;
}

.dark-mode .main-footer a:hover,
.dark-mode .main-footer a:focus {
    color: #fff;
}

.light-mode .main-footer a {
    color: #6c757d;
}

.light-mode .main-footer a:hover,
.light-mode .main-footer a:focus {
    color: #343a40;
}

/* Selfcare account page — breathing room above footer */
.selfcare-account-page .content {
    padding-bottom: 2rem;
}

/* Selfcare main page — keep title on one line on narrow viewports */
.selfcare-page-heading,
.login-logo a {
    white-space: nowrap;
}

.selfcare-login-instructions {
    white-space: pre-line;
    margin-bottom: 0;
}

.ss-password-toggle {
    cursor: pointer;
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.ss-password-toggle:focus {
    outline: none;
    box-shadow: inset 0 0 0 1px rgba(0, 123, 255, 0.45);
}

.ss-password-toggle-icon {
    position: relative;
    display: inline-block;
    width: 1em;
}

.ss-password-toggle--visible .ss-password-toggle-icon::after {
    content: '';
    position: absolute;
    left: -0.1em;
    right: -0.1em;
    top: 50%;
    height: 2px;
    margin-top: -1px;
    background: currentColor;
    transform: rotate(-35deg);
    pointer-events: none;
}

.selfcare-action-row {
    gap: 0.75rem;
}

.selfcare-disconnect-btn {
    font-weight: 400;
    opacity: 0.85;
    border-color: rgba(108, 117, 125, 0.55);
}

.selfcare-disconnect-btn:hover:not(:disabled) {
    opacity: 1;
}

.dark-mode .selfcare-disconnect-btn {
    color: #adb5bd;
    border-color: rgba(173, 181, 189, 0.35);
}

.dark-mode .selfcare-disconnect-btn:hover:not(:disabled) {
    color: #dee2e6;
    background-color: rgba(255, 255, 255, 0.05);
}
