﻿/* oppikieli.css - Общие стили для грамматического справочника */

/* === ОСНОВНЫЕ СТИЛИ === */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
/*    max-width: 1000px;*/    
    margin: 0 auto;
    padding: 20px;
    background-color: #f9f9f9;
}

h1, h2, h3, h4 {
    color: #2c3e50;
    text-align: center;
}

h3 {
    border-bottom: 2px solid #3498db;
    padding-bottom: 10px;
    margin-top: 30px;
}

p {
    margin-bottom: 1em;
    text-align: justify;
}

a {
    color: #2980b9;
    text-decoration: none;
}

    a:hover {
        text-decoration: underline;
    }

/* === СТИЛИ ДЛЯ ТАБЛИЦ === */
.grammar-table {
    width: 100%;
    border-collapse: collapse;
    margin: 20px 0;
    box-shadow: 0 2px 3px rgba(0,0,0,0.1);
    background-color: #fff;
}

    .grammar-table th {
        background-color: #3498db;
        color: white;
        padding: 12px 15px;
        text-align: center;
    }

    .grammar-table td {
        padding: 10px 15px;
        border-bottom: 1px solid #e1e1e1;
        text-align: center;
    }

    .grammar-table tr:nth-child(even) {
        background-color: #f8f9fa;
    }

    .grammar-table tr:hover {
        background-color: #f1f8ff;
    }

/* === ЦВЕТОВОЕ КОДИРОВАНИЕ === */
.consonant-change {
    color: #e74c3c;
    font-weight: bold;
}

.vowel-ending {
    color: #2980b9;
    font-weight: bold;
}

.base-form {
    color: #16a085;
    font-weight: bold;
}

.rule-example {
    font-style: italic;
    color: #7f8c8d;
}

.special-case {
    background-color: #fff9e6 !important;
    border-left: 3px solid #f1c40f;
}

.footnote, .note {
    font-size: 0.9em;
    color: #7f8c8d;
    font-style: italic;
}

/* === КНОПКА "НАВЕРХ" === */
.back-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #3498db;
    color: white;
    width: 50px;
    height: 50px;
    border-radius: 50%;
    border: none;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 2px 10px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
    display: none;
    z-index: 1000;
}

    .back-to-top:hover {
        background: #2980b9;
        transform: translateY(-2px);
        box-shadow: 0 4px 15px rgba(0,0,0,0.4);
    }

    .back-to-top:active {
        transform: translateY(0);
    }

/* === СТИЛИ ДЛЯ СТРУКТУРЫ === */
.toc {
    background: #f0f7ff;
    padding: 15px;
    border-radius: 5px;
    margin: 20px 0;
}

    .toc ul {
        padding-left: 20px;
    }

    .toc li {
        margin-bottom: 5px;
    }

.section-title {
    background: #e8f4fc;
    padding: 10px;
    border-radius: 5px;
    margin: 25px 0 15px 0;
}

.case-group {
    background: #e8f4fc;
    padding: 10px;
    border-radius: 5px;
    margin: 25px 0 15px 0;
}

.rule-box {
    background: #f8f9fa;
    border-left: 4px solid #3498db;
    padding: 15px;
    margin: 15px 0;
    border-radius: 0 5px 5px 0;
}

.case-example {
    background-color: #f0f7ff;
    padding: 10px;
    border-radius: 5px;
    margin: 10px 0;
}

.type-badge {
    display: inline-block;
    background: #3498db;
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.8em;
    margin-left: 10px;
}

/* === АДАПТИВНОСТЬ === */
@media (max-width: 800px) {
    body {
        padding: 0px;
        font-size: 14px;
    }

    .grammar-table {
        display: block;
        overflow-x: auto;
    }

    .back-to-top {
        bottom: 20px;
        right: 20px;
        width: 45px;
        height: 45px;
        font-size: 20px;
    }

    .toc ul {
        padding-left: 15px;
    }
}

/* кнопки перехода по блокам таблиц */
.thtitle {
    border-left: medium none;
    border-right: 1.5pt solid windowtext;
    border-top: medium none;
    border-bottom: 1.0pt solid windowtext;
    padding-left: 5.4pt;
    padding-right: 5.4pt;
    padding-top: 0cm;
    padding-bottom: 0cm;
    text-align: center;
}

.btnVV-primary {
    color: #fff;
    background-color: #337ab7;
    border-color: #2e6da4;
}

.btnVV-success {
    color: #fff;
    background-color: #5cb85c;
    border-color: #4cae4c;
}

.btnVV {
    display: inline-block;
    margin-bottom: 0;
    font-weight: 400;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    -ms-touch-action: manipulation;
    touch-action: manipulation;
    cursor: pointer;
    border: 1px solid transparent;
    padding: 6px 12px;
    font-size: 14px;
    line-height: 1.42857143;
    border-radius: 4px;
    -webkit-user-select: none;
    -moz-user-select: none;
    -ms-user-select: none;
    user-select: none;
}
