/* Custom styles for Panel Schedule Manager */
/* Artifact: styles.css v5 */
/* Changelog: Enhanced #circuitNameTip visibility with a warning-style orange border, black text for high contrast, transparent background, and adjusted padding for a subtle, distinct look */

body {
    font-family: sans-serif;
}

.card {
    transition: box-shadow 0.2s;
}

.card:hover {
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

.card-clickable:hover {
    cursor: pointer;
}

.small {
    font-size: 0.875rem;
}

.font-weight-medium {
    font-weight: 500;
}

.text-decoration-underline:hover {
    text-decoration: underline;
}

.card-title {
    font-size: 1.1rem;
}

.list-unstyled li {
    margin-bottom: 0.5rem;
}

.circuit-action {
    font-size: 0.875rem;
}

.circuit-action:hover {
    text-decoration: underline;
}

html { height: 100%; }
body { min-height: 100%; display: flex; flex-direction: column; }
main { flex: 1; }
footer { margin-top: auto; }

/* Autocomplete suggestions */
#circuitNameSuggestions {
    position: absolute;
    z-index: 1000;
    max-height: 200px;
    overflow-y: auto;
    background-color: var(--bs-secondary-bg);
    border: 1px solid var(--bs-border-color);
    border-radius: 0.25rem;
}

#circuitNameSuggestions .dropdown-item {
    padding: 0.5rem 1rem;
    cursor: pointer;
}

#circuitNameSuggestions .dropdown-item.active {
    background-color: #007bff;
    color: white;
}

/* NEC tips */
#circuitNameTip {
    font-size: 0.9rem; /* Slightly larger for readability */
    color: var(--bs-warning-text-emphasis); /* Light for dark theme contrast */\n    border: 1px solid var(--bs-warning-border-subtle); /* Muted orange (Bootstrap warning color) for a warning-style border */
    background-color: var(--bs-warning-bg-subtle); /* Subtle warning bg for visibility */
    padding: 0.3rem 0.6rem; /* Slightly increased padding for a boxed appearance */
    border-radius: 0.25rem; /* Rounded corners for a polished look */
    margin-left: 0.5rem;
    display: inline-block; /* Ensure proper alignment */
}

/* Panel Schedule - 3 Column Centered Layout (Left details | Both poles in center | Right details) */
.panel-schedule {
    table-layout: fixed;
    width: 100%;
    border-collapse: collapse;
}

.panel-schedule td {
    padding: 12px 8px;
    vertical-align: middle;
}

.panel-schedule .center-column {
    max-width: 68px;
    width: 68px;
    background-color: var(--bs-secondary-bg);
    font-weight: 700;
    color: var(--bs-emphasis-color);
    border-left: 2px solid var(--bs-border-color);
    border-right: 2px solid var(--bs-border-color);
    padding: 10px 4px;
    line-height: 1.1;
    font-size: 0.9rem;
}

.panel-schedule .center-numbers {
    display: flex;
    flex-direction: column;
    gap: 3px;
    height: 100%;
}

/* Left pole number appears on left side of center, right pole on right side */
.panel-schedule .left-pole {
    text-align: left;
    padding-left: 4px;
}

.panel-schedule .right-pole {
    text-align: right;
    padding-right: 4px;
}

/* Strange style 2-pole tandem breaker (rare 4-pole → 3-circuit config) */
.circuit-detail.strange-breaker {
    background-color: var(--bs-warning-bg-subtle);
    border-left: 4px solid var(--bs-warning);
    padding-left: 8px;
    margin-bottom: 8px;
}

.panel-schedule .pole-num.single {
    text-align: center !important;
    font-size: 1.05rem;
    padding: 8px 0;
}

.panel-schedule td:nth-child(1),
.panel-schedule td:nth-child(3) {
    width: 43%;
    padding: 16px 12px;
}

/* Better spacing for empty states and action buttons */
.panel-schedule .d-flex.justify-content-center {
    gap: 0.75rem;
}

/* Mobile: pole numbers side-by-side in center column */
@media (max-width: 575.98px) {
    .panel-schedule .center-numbers {
        flex-direction: row !important;
        gap: 4px;
        height: auto;
        justify-content: space-between;
        align-items: center;
    }
    .panel-schedule .center-column {
        width: 90px !important;
        max-width: 90px;
        font-size: 0.8rem;
        line-height: 1;
        padding: 4px 2px;
    }
    .panel-schedule .left-pole,
    .panel-schedule .right-pole {
        padding: 0 1px;
        font-weight: 700;
    }
}

/* Nav menu hover */
.nav-menu-link {
  transition: background-color 0.2s ease;
}
.nav-menu-link:hover {
  background-color: rgba(255, 255, 255, 0.1) !important;
  border-radius: 0.5rem !important;
}
