html {
    font-size: 14px;
}

@media (min-width: 768px) {
    html {
        font-size: 16px;
    }
}

.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;
}

html {
    position: relative;
    min-height: 100%;
}

body {
    margin-bottom: 60px;
}

.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;
}

/* Dark theme styles moved from _Layout */
html, body {
    background: #181818;
    color: #fff;
}

.box, .navbar, .card, .modal-content {
    background: #232323 !important;
    color: #fff !important;
}

.input.is-dark, .textarea.is-dark {
    background: #232323;
    color: #fff;
    border: 1px solid #444;
}

.has-text-white {
    color: #fff !important;
}

.has-background-dark {
    background: #232323 !important;
}

/* Small left margin for icon text */
.icon-text {
    margin-left: 6px;
}
/* Make checkbox labels block-level for vertical layout */
.checkbox-block {
    display: block;
}
/* Boolean icon styles */
.bool-yes {
    color: #48c774;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}

.bool-no {
    color: #f14668;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
}
/* Highlight disabled rows (subtle red tint for dark theme) */
.table.is-striped tbody tr.disabled-row,
.table tbody tr.disabled-row {
    background-color: rgba(241, 70, 86, 0.12) !important;
    border-left: 3px solid rgba(241, 70, 86, 0.6);
}

    .table.is-striped tbody tr.disabled-row:nth-child(even),
    .table tbody tr.disabled-row:nth-child(even) {
        background-color: rgba(241, 70, 86, 0.15) !important;
        border-left: 3px solid rgba(241, 70, 86, 0.6);
    }

    /* Additional visual indicator for disabled rows */
    .table tbody tr.disabled-row td {
        opacity: 0.7;
    }
/* Highlight banned proxy rows */
.table.is-striped tbody tr.banned-row,
.table tbody tr.banned-row {
    background-color: rgba(241, 70, 86, 0.08) !important;
    border-left: 3px solid rgba(241, 70, 86, 0.4);
}

    .table.is-striped tbody tr.banned-row:nth-child(even),
    .table tbody tr.banned-row:nth-child(even) {
        background-color: rgba(241, 70, 86, 0.12) !important;
        border-left: 3px solid rgba(241, 70, 86, 0.4);
    }

    /* Additional visual indicator for banned rows */
    .table tbody tr.banned-row td {
        opacity: 0.8;
    }
/* Ensure action buttons group doesn't stretch layout */
.buttons .button {
    margin-right: 6px;
}

/* Table striped override for dark theme */
.table.is-striped tbody tr:nth-child(even) {
    background-color: rgba(255, 255, 255, 0.02) !important;
}

/* Statistics page styles */
.has-border-primary {
    border: 2px solid #3273dc !important;
}

.is-selected {
    background-color: #f5f5f5;
}

.box {
    box-shadow: 0 4px 12px rgba(0,0,0,0.05);
    border: 1px solid #e8e8e8;
}

/* Mobile responsive styles */
@media (max-width: 768px) {
    .table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }

    .table th, .table td {
        white-space: nowrap;
        padding: 0.5em 0.25em;
        font-size: 0.875rem;
        color: #fff;
    }

    .table th {
        background-color: #333;
        border-bottom: 1px solid #555;
    }

    .table.is-striped tbody tr:nth-child(even) {
        background-color: rgba(255, 255, 255, 0.02);
    }

    .navbar-item {
        padding: 0.5rem;
    }

    .navbar-menu {
        z-index: 50;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: #232323;
    }

    .icon-text {
        margin-left: 4px;
        font-size: 0.875rem;
    }

    .title {
        font-size: 1.5rem;
    }

    .section {
        padding: 0.5rem;
    }

    .container {
        padding: 0 0.25rem;
    }

        .container.is-fluid {
            padding-left: 0;
            padding-right: 0;
        }

    .button {
        font-size: 0.875rem;
        padding: 0.5rem 0.75rem;
    }

    .input, .textarea, .select select {
        font-size: 0.875rem;
    }

    .box {
        padding: 0.75rem;
    }

    .notification {
        padding: 0.5rem;
        font-size: 0.875rem;
    }
    
    /* Buttons in tables */
    .buttons.are-small .button {
        padding: 0.25rem 0.5rem;
    }
    
    /* Action buttons compact */
    .table .buttons {
        margin-bottom: 0;
    }
    
    .table .buttons .button {
        margin-bottom: 0;
        margin-right: 0.25rem;
    }
    
    /* Columns mobile adjustments */
    .columns.is-mobile > .column {
        padding: 0.25rem;
    }
    
    /* Hide elements on mobile */
    .is-hidden-mobile {
        display: none !important;
    }

    /* Statistics specific mobile styles */
    .title.is-2 {
        font-size: 1.75rem !important;
    }

    .notification .level-right {
        display: none !important;
    }

    .tags.has-addons {
        justify-content: flex-start;
    }

    /* Download statistics mobile layout */
    .level.is-mobile {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }

    .level.is-mobile .level-left {
        margin-bottom: 0;
        margin-right: auto;
        flex-shrink: 0;
    }

    .level.is-mobile .level-left .level-item {
        justify-content: flex-start;
        flex-direction: row;
        align-items: center;
    }

    .level.is-mobile .level-right {
        margin-left: auto;
        flex-shrink: 0;
        display: flex;
        flex-direction: row;
    }

    .level.is-mobile .level-right .level-item {
        justify-content: flex-end;
        flex-direction: row;
        align-items: center;
    }

    .level-item {
        display: flex !important;
        flex-direction: row !important;
        align-items: center !important;
    }
}

/* Desktop level styles */
@media (min-width: 769px) {
    .level {
        display: flex;
        align-items: center;
        justify-content: space-between;
    }

    .level-left {
        display: flex;
        align-items: center;
        flex-basis: auto;
        flex-grow: 0;
        flex-shrink: 0;
        justify-content: flex-start;
    }

    .level-right {
        display: flex;
        align-items: center;
        flex-basis: auto;
        flex-grow: 0;
        flex-shrink: 0;
        justify-content: flex-end;
        margin-left: auto;
    }

    .level-item {
        display: flex;
        align-items: center;
        flex-basis: auto;
        flex-grow: 0;
        flex-shrink: 0;
        justify-content: center;
        flex-direction: row;
        white-space: nowrap;
    }

    .level-item > * {
        margin: 0;
        display: inline-flex;
        align-items: center;
    }

    .level-item .icon {
        display: inline-flex;
        align-items: center;
    }
}

/* Detail page table styles - prevent horizontal scroll on mobile */
.detail-table td {
    word-break: break-word;
    white-space: normal !important;
    max-width: 0;
}

.detail-table code {
    word-break: break-all;
    white-space: normal;
    word-wrap: break-word;
    max-width: 100%;
}

.detail-table a {
    word-break: break-all;
}

/* Breadcrumb long text handling */
.breadcrumb li {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.breadcrumb li.is-active {
    max-width: 300px;
}

@media (max-width: 768px) {
    .breadcrumb li {
        max-width: 120px;
    }
    
    .breadcrumb li.is-active {
        max-width: 180px;
    }
    
    .detail-table td {
        display: block;
        width: 100%;
    }
    
    .detail-table td:first-child {
        font-weight: bold;
        padding-bottom: 0;
    }
    
    .detail-table td:last-child {
        padding-top: 0;
    }
    
    .section .button {
        width: 100%;
        justify-content: center;
    }
}
