:root
{
    --bg: #f3f3f3;
    --panel: #ffffff;
    --text: #101010;
    --line: #d9d9d9;
    --bar: #444444;
    --muted: #666666;
    --accent: #0d6b57;
    --danger: #b3261e;
    --block_side_padding: 10px;
}

*
{
    box-sizing: border-box;
}

body
{
    margin: 0;
    min-height: 100vh;
    font-family: "Segoe UI", "Helvetica Neue", sans-serif;
    background: var(--bg);
    color: var(--text);
}

p
{
    margin: 0;
}

.app
{
    width: min(560px, 100%);
    margin: 0 auto;
    min-height: 100vh;
    display: grid;
    grid-template-rows: auto 1fr auto;
    background: var(--panel);
}

.app_header
{
    padding: 10px 12px 0 12px;
    display: grid;
    gap: 8px;
}

.app_title
{
    margin: 0;
    font-size: 100%;
    background: var(--bar);
    color: #ffffff;
    border-radius: 8px;
    padding: 8px 10px;
    text-align: center;
}

.app_location
{
    font-size: 100%;
    color: var(--text);
    text-align: center;
    white-space: pre-line;
    line-height: 1.35;
}

.lang_group
{
    display: flex;
    gap: 5px;
    flex-wrap: wrap;
    justify-content: center;
}

.lang_link
{
    border: 1px solid var(--line);
    background: #ffffff;
    border-radius: 6px;
    min-height: 44px;
    min-width: 70px;
    padding: 5px 8px 4px 8px;
    font: inherit;
    font-size: 100%;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 2px;
    text-decoration: none;
    color: inherit;
}

.lang_link .icon
{
    display: block;
    width: 22px;
    height: 14px;
    object-fit: cover;
    border: 1px solid #cfcfcf;
}

.lang_link .lang_label
{
    line-height: 1.1;
}

.app_main
{
    padding: 0 var(--block_side_padding);
    display: grid;
    gap: 10px;
}

.app_main.hidden
{
    display: none;
}

.block
{
    border: 0;
    border-radius: 8px;
    padding: 0;
    overflow: hidden;
    display: grid;
    gap: 8px;
}

.block h2
{
    margin: 0;
    font-size: 100%;
}

.block_head
{
    padding: 7px 0;
    display: flex;
    align-items: stretch;
    justify-content: space-between;
    gap: 8px;
}

.block_head h2
{
    background: var(--bar);
    color: #ffffff;
    border-radius: 8px;
    padding: 6px 10px;
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    min-height: 32px;
}

.calendar_nav
{
    display: flex;
    align-items: center;
    gap: 5px;
    justify-content: center;
}

#calendar_month_label
{
    font-size: 100%;
    min-width: 110px;
    text-align: center;
}

.calendar_nav_button
{
    border: 1px solid var(--line);
    background: #ffffff;
    border-radius: 6px;
    width: 30px;
    height: 30px;
    cursor: pointer;
}

.calendar_weekdays,
.calendar_grid
{
    display: grid;
    grid-template-columns: repeat(7, minmax(0, 1fr));
    gap: 4px;
}

.calendar_weekdays span
{
    text-align: center;
    font-size: 100%;
    color: var(--muted);
}

.day_button
{
    height: 35px;
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
    cursor: pointer;
    font: inherit;
    font-size: 100%;
}

.day_button.outside
{
    color: #8a8a8a;
}

.day_button.today
{
    border-color: var(--accent);
}

.day_button.active
{
    border-color: var(--accent);
    background: var(--accent);
    color: #ffffff;
}

.day_button:disabled
{
    opacity: 0.35;
    cursor: not-allowed;
}

.options_grid
{
    display: grid;
    gap: 6px;
    grid-template-columns: repeat(auto-fit, minmax(84px, 1fr));
}

.option_button
{
    border: 1px solid var(--line);
    border-radius: 6px;
    background: #ffffff;
    min-height: 34px;
    cursor: pointer;
    font: inherit;
}

.option_button.active
{
    border-color: var(--accent);
    background: var(--accent);
    color: #ffffff;
}

.option_hint
{
    border: 1px dashed var(--line);
    border-radius: 6px;
    padding: 9px 10px;
    color: var(--muted);
    font-size: 100%;
    text-align: center;
    background: #fbfbfb;
}

.contact_fields
{
    display: grid;
    gap: 8px;
}

.contact_item[hidden]
{
    display: none;
}

.contact_input
{
    width: 100%;
    min-height: 40px;
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 9px 12px;
    font: inherit;
}

.contact_message_input
{
    min-height: 100px;
    resize: vertical;
}

.contact_message_counter
{
    margin: 4px 2px 0 2px;
    text-align: right;
    font-size: 84%;
    color: var(--muted);
}

.contact_message_counter.limit_reached
{
    color: var(--danger);
    font-weight: 600;
}

.contact_input:focus
{
    outline: none;
}

.guard_input
{
    position: absolute;
    left: -9999px;
}

.status_text
{
    margin: 0;
    display: none;
    background: var(--danger);
    color: #ffffff;
    border-radius: 8px;
    padding: 8px 10px;
    font-size: 100%;
    line-height: 1.35;
}

.status_text.active
{
    display: block;
}

.success_text
{
    margin: 10px var(--block_side_padding) 0 var(--block_side_padding);
    display: none;
    align-self: start;
    height: fit-content;
    background: #0d6b57;
    color: #ffffff;
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 100%;
    line-height: 1.45;
    text-align: center;
}

.success_text.active
{
    display: block;
}

.success_text p
{
    margin: 0;
}

.success_summary_table
{
    width: 100%;
    table-layout: fixed;
    border-collapse: collapse;
    margin: 8px 0;
    font-size: 95%;
}

.success_summary_table th,
.success_summary_table td
{
    width: 50%;
    border: 1px solid rgba(255, 255, 255, 0.5);
    padding: 4px 6px;
    vertical-align: top;
}

.success_summary_table th
{
    color: #d8ede8;
    font-weight: 600;
    text-align: right;
}

.success_summary_table td
{
    text-align: left;
}

.privacy_text
{
    font-size: 100%;
    line-height: 1.35;
    color: #000000;
    text-transform: uppercase;
    font-family: "Consolas", "Courier New", monospace;
    text-align: justify;
}

.app_footer
{
    padding: var(--block_side_padding);
}

.send_button
{
    width: 100%;
    border: 1px solid #0b5747;
    background: #0d6b57;
    color: #ffffff;
    border-radius: 8px;
    min-height: 42px;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
}

.send_button:disabled
{
    opacity: 0.5;
    cursor: default;
}
