form {
    margin: 0;
    padding: 0;
    display: inline;
}

tr.htmx-swapping td {
    opacity: 0;
    transition: opacity 1s ease-out;
}

.badge {
    background-color: #999;
    color: white;
    padding: 4px 8px;
    margin: 2px;
    text-align: center;
    border-radius: 5px;
}

.htmx-indicator {
    display: none;
}

.text-center {
    text-align: center;
}

.version {
    font-size: 0.8em;
    color: #999;
}

.is-loading {
    pointer-events: none;
    opacity: 0.65;
}

.domain-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.domain-summary-card {
    border: 1px solid var(--muted-border-color);
    border-radius: var(--border-radius);
    padding: 1rem;
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
}

.domain-summary-card strong {
    font-size: 1.4rem;
}

.domain-form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
}

.domain-form-actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.domain-toolbar {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1rem;
}

.domain-toggle-field {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.overflow-auto {
    overflow-x: auto;
}

.status-badge {
    display: inline-block;
    padding: 0.2rem 0.55rem;
    border-radius: 999px;
    font-size: 0.82rem;
}

.status-enabled {
    background: #dff5e2;
    color: #116329;
}

.status-disabled,
.status-blocked {
    background: #fde7e7;
    color: #8d1c1c;
}

.status-maintenance,
.status-circuit_open {
    background: #fff0d8;
    color: #8d5a00;
}

/* pico css overrides */

:root {
    --form-element-spacing-vertical: 0.15rem;
    --form-element-spacing-horizontal: 1rem;
}

/** dynamic nav bar **/

.topnav {
    overflow: hidden;
}

.topnav a {
    float: left;
    display: block;
    text-align: center;
    padding: 14px 16px;
    text-decoration: none;
    font-size: 17px;
}

.topnav .icon {
    display: none;
}

@media screen and (max-width: 775px) {
    .topnav a:not(:first-child) {
        display: none;
    }

    .topnav a.icon {
        float: right;
        display: block;
    }
}

@media screen and (max-width: 775px) {
    .topnav.responsive {
        position: relative;
    }

    .topnav.responsive a.icon {
        position: absolute;
        right: 0;
        top: 0;
    }

    .topnav.responsive a {
        float: none;
        display: block;
        text-align: left;
    }
}

/** tab support for admin page **/

[role="tabs"] {
    display: flex;
  }
  
  [role="tabs"] section {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
  }
  
  [role="tabs"] figure {
    flex-grow: 1;
    width: 100%;
    height: 100%;
    display: none;
  }
  
  [role="tabs"] [type="radio"]:checked + figure {
    display: block;
  }
  
  nav[role="tab-control"] label.active {
    color: var(--primary);
    cursor: pointer;
  }
