/**
 * Layout - Структура, навигация, overlays
 * Tab bar, Screen overlays, Headers
 */

/* ===============================================
   TAB BAR
   =============================================== */

.tab-bar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: var(--tab-bar-height);
    padding-bottom: var(--safe-area-bottom);
    background: var(--bg-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-around;
    align-items: center;
    z-index: 1000;
}

.tab-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    background: none;
    border: none;
    padding: 8px 4px;
    cursor: pointer;
    color: var(--text-muted);
    transition: color 0.2s;
    min-width: 0;
}

.tab-btn:active {
    transform: scale(0.95);
}

.tab-btn.active {
    color: var(--accent);
}

.tab-icon {
    font-size: 22px;
    line-height: 1;
}

.tab-label {
    font-size: 10px;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
}

/* ===============================================
   TAB CONTENT
   =============================================== */

.tab-content {
    display: none;
    flex: 1;
    padding-bottom: calc(var(--tab-bar-height) + var(--safe-area-bottom));
    animation: fadeIn 0.2s ease;
}

.tab-content.active {
    display: block;
}

/* Tab Header */
.tab-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    padding: 20px;
    text-align: center;
}

.tab-header h1 {
    font-size: 22px;
    font-weight: 600;
    margin-bottom: 4px;
}

.tab-header p {
    font-size: 14px;
    opacity: 0.9;
}

.tab-desc {
    font-size: 14px;
    opacity: 0.85;
    line-height: 1.5;
}

/* Tab Main Content */
.tab-main {
    padding: 16px;
    max-width: 600px;
    margin: 0 auto;
}

/* ===============================================
   SCREEN OVERLAYS
   =============================================== */

.screen-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--bg-primary);
    z-index: 500;
    display: none;
    flex-direction: column;
    overflow-y: auto;
}

.screen-overlay.active {
    display: flex;
    animation: slideIn 0.25s ease;
}

/* Screen Header */
.screen-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    position: sticky;
    top: 0;
    z-index: 100;
}

.screen-header h1 {
    font-size: 18px;
    font-weight: 600;
    flex: 1;
}

/* Screen Main */
.screen-main {
    flex: 1;
    padding: 16px;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}

/* Screen Content (alias) */
.screen-content {
    flex: 1;
    padding: 16px;
    max-width: 600px;
    margin: 0 auto;
    width: 100%;
}
