/* Template settings - обновленный стиль */

/* Общий стиль страницы */
html {
    overflow-y: hidden;
    height: 100%;
}

body {
    color: #660000;
    font-family: 'Arial', sans-serif;
    background-color: #ffffcc;
    margin: 0;
    height: 100%;
    display: flex;
    flex-direction: column;
}

#template-header, #template-menu {
    flex: 0 0 auto;
}

#template-main {
    flex: 1 1 auto;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}

#template-title {
    padding: 0 1ex;
    font-weight: bold;
    color: #660000;
}

/* Меню */
#template-menu {
    background-color: #ffcc00;
    text-align: center;
    border-bottom: 3px solid #993333;
    padding: 0.5ex 0;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

#template-menu a {
    color: #660000;
    font-family: 'Arial', sans-serif;
    font-weight: bold;
    text-decoration: none;
    padding: 0 1em;
    transition: background 0.3s ease-in-out;
}

#template-menu a:hover {
    background-color: #993333;
    color: #ffffff;
    border-radius: 5px;
    padding: 0.5ex 1em;
}

/* Ошибки и успехи */
.template-error, #template-success {
    border-radius: 10px;
    margin: 1ex;
    padding: 1ex;
    font-weight: bold;
}

.template-error {
    background-color: #ffcccc;
    color: #990000;
}

#template-success {
    background-color: #ccffcc;
    color: #006600;
}

.head {
    text-align: center;
}

img.head {
    display: block;
    margin: auto;
}

.locale {
    position: absolute;
    top: 0;
    right: 0;
}

/* Общий стиль заголовков */
h1, h2, h3, h4 {
    font-family: 'Arial', sans-serif;
    color: #993333;
    text-align: start;
    margin: 0.5em 0 0.1em 0;
}

table.list td,
table.properties td {
    vertical-align: top;
}


h1:empty, h2:empty, h3:empty, h4:empty {
    display: none;
}

h1 { font-size: x-large; }
h2 { font-size: large; }
h3 { font-size: medium; }
h4 { font-size: medium; font-weight: normal; }

/* Ссылки */
a {
    color: #993333;
    text-decoration: none;
    font-weight: bold;
    text-decoration: underline;
}

a:hover {
    background-color: #ffcc00;
    padding: 0.2em;
    border-radius: 5px;
}

/** Padded elements */
.template-padded {
    padding: 20px;
    display: flex;
    flex-direction: column;
}

/* Таблицы */
table.list, table.properties {
    border-collapse: collapse;
    margin: 1ex 0;
    border: 2px solid #993333;
}

table.list td, table.properties td {
    padding: 5px;
    border: 1px solid #993333;
}

table.list thead {
    background-color: #ffcc00;
    font-weight: bold;
    text-align: left;
}

/* Кнопки */
button, input[type="submit"] {
    background-color: #660000;
    color: #ffffff;
    border: none;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

button:hover, input[type="submit"]:hover {
    background-color: #993333;
}
