/* Clean up site.css to avoid conflicts with modern-theme.css */
@import url('open-iconic/font/css/open-iconic-bootstrap.min.css');

html, body {
    margin: 0;
    padding: 0;
}

/* Page titles should follow modern-theme.css */
h1 {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 1.5rem;
}

.content {
    padding-top: 0; /* Remove top gap */
}

/* Блокировка действий при неактивной подписке */
.subscription-inactive button:not(.subscription-allow),
.subscription-inactive .btn:not(.subscription-allow),
.subscription-inactive [role="button"]:not(.subscription-allow) {
    pointer-events: none;
    opacity: 0.6;
    cursor: not-allowed;
}

.subscription-inactive .bottom-nav-fab {
    pointer-events: none;
    opacity: 0.6;
    cursor: not-allowed;
}

.subscription-inactive .subscription-allow {
    pointer-events: auto;
    opacity: 1;
    cursor: pointer;
}

/* Keep essential validation styles */
.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--success);
}
.invalid {
    outline: 1px solid var(--danger);
}
.validation-message {
    color: var(--danger);
}

/* Bottom Nav Safe Area - handled in modern-theme.css */

/* === ЕДИНЫЙ СТИЛЬ ДЛЯ ВЕРХНИХ ВКЛАДОК (ТАБОВ) === */
.cp-nav-tabs {
    border-bottom: 1px solid #e9ecef;
    padding: 0;
    margin: 0;
    display: flex;
    gap: 0;
    background: transparent;
    flex-wrap: nowrap;
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.cp-nav-tabs::-webkit-scrollbar {
    display: none;
}

.cp-nav-tabs .nav-item {
    margin-bottom: 0;
    flex-shrink: 0;
    white-space: nowrap;
}

.cp-nav-tabs .nav-link {
    border: none;
    border-bottom: 2px solid transparent;
    background: transparent;
    color: #6c757d;
    padding: 0.875rem 1.5rem;
    font-weight: 400;
    font-size: 0.9rem;
    position: relative;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: -1px;
    cursor: pointer;
    white-space: nowrap;
    transition: all 0.2s ease;
}

.cp-nav-tabs .nav-link.active {
    color: #4F46E5;
    background-color: transparent;
    border-bottom-color: #4F46E5;
    font-weight: 500;
}

.cp-nav-tabs .nav-link .oi {
    font-size: 0.95rem;
    margin-right: 0.5rem;
}

.cp-nav-tabs .nav-link:hover:not(.active) {
    color: #4F46E5;
    border-bottom-color: rgba(79, 70, 229, 0.3);
}

@media (max-width: 768px) {
    .cp-nav-tabs .nav-link {
        padding: 0.75rem 1rem;
        font-size: 0.85rem;
    }
    .cp-nav-tabs .nav-link .oi {
        font-size: 0.85rem;
        margin-right: 0.375rem;
    }
}

/* === ЕДИНЫЙ СТИЛЬ ДЛЯ КНОПКИ "НАЗАД" (без серой заливки, граница только при наведении) === */
.btn-outline-secondary.cp-back-btn {
    background-color: transparent !important;
    color: #6c757d !important;
    border-color: transparent !important;
}

.btn-outline-secondary.cp-back-btn:hover {
    background-color: transparent !important;
    color: #6c757d !important;
    border-color: #6c757d !important;
}

.btn-outline-secondary.cp-back-btn:focus,
.btn-outline-secondary.cp-back-btn:focus-visible {
    background-color: transparent !important;
    color: #6c757d !important;
    border-color: #6c757d !important;
    box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.15) !important;
}

.btn-outline-secondary.cp-back-btn:active,
.btn-outline-secondary.cp-back-btn.active {
    background-color: transparent !important;
    color: #6c757d !important;
    border-color: #6c757d !important;
    box-shadow: 0 0 0 0.2rem rgba(108, 117, 125, 0.15) !important;
}

/* Blazor Error UI - скрыт по умолчанию, показывается только при ошибках */
#blazor-error-ui {
    display: none;
    background: #d32f2f;
    color: white;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 100000;
}

#blazor-error-ui .dismiss {
    cursor: pointer;
    position: absolute;
    right: 0.75rem;
    top: 0.5rem;
    color: white;
    text-decoration: none;
    font-size: 1.25rem;
    line-height: 1;
}

#blazor-error-ui .reload {
    color: white;
    text-decoration: underline;
    margin-left: 0.5rem;
}
