html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

a, .btn-link {
    color: #006bb7;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

.nav-icon {
    font-size: 1.1rem;
    line-height: 1;
    display: inline-flex;
    align-items: center;
}
/* ================================
   Encoder Monitor – Custom Style
   ================================ */

.encoder-container {
    padding: 24px;
    background: #f4f6fb;
    min-height: 100vh;
}

.encoder-card {
    background: #ffffff;
    border-radius: 12px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,0.08);
}

.encoder-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.encoder-title {
    font-size: 26px;
    font-weight: 600;
    color: #1f2937;
}

/* ===== Buttons ===== */
.encoder-actions button {
    padding: 8px 18px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    margin-left: 8px;
    cursor: pointer;
    transition: 0.2s ease;
}

.btn-start {
    background: #22c55e;
    color: #fff;
}

    .btn-start:hover {
        background: #16a34a;
    }

.btn-stop {
    background: #ef4444;
    color: #fff;
}

    .btn-stop:hover {
        background: #dc2626;
    }

/* ===== Table ===== */
.encoder-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

    .encoder-table thead {
        background: #1e3a8a;
        color: #fff;
    }

    .encoder-table th,
    .encoder-table td {
        padding: 12px 14px;
        text-align: center;
    }

    .encoder-table tbody tr {
        border-bottom: 1px solid #e5e7eb;
    }

        .encoder-table tbody tr:hover {
            background: #f1f5f9;
        }

.encoder-id {
    font-weight: 600;
    color: #2563eb;
}

.encoder-raw {
    font-family: monospace;
    color: #111827;
}

.encoder-pos {
    font-weight: 600;
    color: #16a34a;
}


.encoder-time {
    font-size: 14px;
    color: #6b7280;
}

/* ===== Status ===== */
.encoder-status {
    margin-top: 10px;
    font-size: 14px;
    color: #374151;
}
.encoder-data {
    font-family: Consolas, monospace;
    color: #2563eb;
    letter-spacing: 1px;
}

.encoder-id {
    font-weight: 600;
    color: #1e40af;
}

.encoder-pos {
    font-weight: bold;
    color: #059669;
}

.state-op {
    color: #0f5132;
    background: #d1e7dd;
}

.state-preop {
    color: #664d03;
    background: #fff3cd;
}

.state-stop {
    color: #842029;
    background: #f8d7da;
}

.state-timeout {
    color: #842029;
    background: #f5c2c7;
}

.state-unknown {
    color: #41464b;
    background: #e2e3e5;
}
/* ===== Bitrate group ===== */
.bitrate-group {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #f8f9fb;
    border: 1px solid #d0d7e2;
    border-radius: 8px;
    padding: 6px 10px;
}

/* Label */
.bitrate-label {
    font-size: 13px;
    font-weight: 600;
    color: #3b4a66;
    margin-right: 4px;
}

/* Select */
.bitrate-select {
    appearance: none;
    padding: 6px 28px 6px 10px;
    font-size: 13px;
    border-radius: 6px;
    border: 1px solid #b8c2d3;
    background-color: #ffffff;
    color: #1f2a44;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg width='10' height='6' viewBox='0 0 10 6' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23556688' stroke-width='1.5' fill='none'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 8px center;
}

    .bitrate-select:hover {
        border-color: #4f73ff;
    }

    .bitrate-select:focus {
        outline: none;
        border-color: #4f73ff;
        box-shadow: 0 0 0 2px rgba(79,115,255,0.15);
    }

/* Apply button */
.btn-apply {
    padding: 6px 14px;
    border-radius: 6px;
    border: none;
    background: #2ecc71;
    color: white;
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    transition: background 0.2s ease;
}

    .btn-apply:hover {
        background: #27ae60;
    }
.btn {
    position: relative;
    padding: 10px 18px;
    border-radius: 8px;
    border: none;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.08s ease, box-shadow 0.08s ease, opacity 0.15s;
}

    .btn:active {
        transform: scale(0.96);
    }

    .btn:disabled {
        opacity: 0.6;
        cursor: not-allowed;
    }

/* COLORS */
.btn-start {
    background: #16a34a;
    color: white;
}

.btn-stop {
    background: #dc2626;
    color: white;
}

.btn-apply {
    background: #2563eb;
    color: white;
}

/* HOVER */
.btn:hover:not(:disabled) {
    box-shadow: 0 6px 16px rgba(0,0,0,0.2);
}

/* LOADING SPINNER */
.btn.loading {
    pointer-events: none;
}

    .btn.loading::after {
        content: "";
        width: 16px;
        height: 16px;
        border: 2px solid rgba(255,255,255,0.5);
        border-top-color: white;
        border-radius: 50%;
        position: absolute;
        right: 12px;
        top: 50%;
        transform: translateY(-50%);
        animation: spin 0.8s linear infinite;
    }

@keyframes spin {
    to {
        transform: translateY(-50%) rotate(360deg);
    }
}
