﻿* {
    box-sizing: border-box;
}

html, body {
    height: 100%;
    margin: 0;
}

body {
    font-family: 'Segoe UI', Arial, sans-serif;
    background: linear-gradient(135deg, #eef1fb 0%, #dbe3fa 100%);
}

.field-validation-valid {
    display: none;
}

.page-wrapper {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px 20px;
}

.form {
    display: flex;
    flex-direction: column;
    gap: 14px;
    width: 100%;
    max-width: 580px;
    background-color: #fff;
    padding: 32px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(65, 74, 158, 0.15);
    position: relative;
}

.title {
    font-size: 26px;
    color: royalblue;
    font-weight: 700;
    letter-spacing: -0.5px;
    position: relative;
    display: flex;
    align-items: center;
    padding-left: 28px;
    margin: 0 0 4px 0;
}

    .title::before, .title::after {
        position: absolute;
        content: "";
        border-radius: 50%;
        left: 0px;
        background-color: royalblue;
    }

    .title::before {
        width: 18px;
        height: 18px;
    }

    .title::after {
        width: 18px;
        height: 18px;
        animation: pulse 1.5s linear infinite;
    }

.message {
    color: rgba(88, 87, 87, 0.85);
    font-size: 14px;
    line-height: 1.4;
    margin: 0 0 8px 0;
}

.message-strong {
    font-weight: 500;
}

.flex {
    display: flex;
    width: 100%;
    gap: 10px;
}

    .flex label {
        flex: 1;
    }

.form label {
    position: relative;
    display: block;
}

    .form label .input {
        width: 100%;
        height: 56px;
        padding: 20px 12px 6px 12px;
        outline: 0;
        border: 1px solid rgba(105, 105, 105, 0.3);
        border-radius: 10px;
        font-size: 14px;
        font-family: inherit;
        background-color: #fafbff;
        transition: border-color 0.2s ease;
    }

        .form label .input:focus {
            border-color: royalblue;
            background-color: #fff;
        }

        .form label .input + span {
            position: absolute;
            left: 12px;
            right: 12px;
            top: 50%;
            transform: translateY(-50%);
            color: grey;
            font-size: 0.82em;
            line-height: 1.15;
            cursor: text;
            transition: all 0.15s ease;
            background-color: transparent;
            pointer-events: none;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .form label .input:focus + span,
        .form label .input:not(:placeholder-shown) + span,
        .form label input[type="date"] + span {
            top: 10px;
            transform: translateY(0);
            font-size: 0.68em;
            font-weight: 600;
            white-space: normal;
            overflow: visible;
        }

        .form label .input:focus + span {
            color: royalblue;
        }

.field-validation-error {
    display: block !important;
    color: #d64545;
    font-size: 12px;
    margin-top: -10px;
    margin-bottom: 0;
}

.submit {
    border: none;
    outline: none;
    background-color: royalblue;
    padding: 12px;
    border-radius: 10px;
    color: #fff;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

    .submit:hover {
        background-color: rgb(56, 90, 194);
    }

    .submit:active {
        transform: scale(0.98);
    }

@keyframes pulse {
    from {
        transform: scale(0.9);
        opacity: 1;
    }

    to {
        transform: scale(1.8);
        opacity: 0;
    }
}

.flatpickr-calendar {
    border-radius: 14px;
    box-shadow: 0 10px 30px rgba(65, 74, 158, 0.2);
    border: none;
}

.flatpickr-day.selected,
.flatpickr-day.selected:hover {
    background: royalblue;
    border-color: royalblue;
}

.flatpickr-day:hover {
    background: #eef1fb;
}

.flatpickr-months .flatpickr-month,
.flatpickr-current-month .flatpickr-monthDropdown-months,
.flatpickr-weekdays {
    background: #fafbff;
    border-radius: 14px 14px 0 0;
}

.flatpickr-day.today {
    border-color: royalblue;
}


.confirmation {
    align-items: center;
    text-align: center;
}

.confirmation-title {
    padding-left: 0;
    justify-content: center;
}

    .confirmation-title::before,
    .confirmation-title::after {
        display: none;
    }

.confirmation-message {
    text-align: center;
}

.check-icon {
    margin-bottom: 8px;
}

.check-circle {
    stroke: royalblue;
    stroke-width: 2;
    stroke-dasharray: 166;
    stroke-dashoffset: 166;
    animation: draw-circle 0.6s ease-out forwards;
}

.check-mark {
    stroke: royalblue;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 48;
    stroke-dashoffset: 48;
    animation: draw-check 0.4s ease-out 0.5s forwards;
}

@keyframes draw-circle {
    to {
        stroke-dashoffset: 0;
    }
}

@keyframes draw-check {
    to {
        stroke-dashoffset: 0;
    }
}

.confirmation-btn {
    display: inline-block;
    text-decoration: none;
    text-align: center;
    margin-top: 8px;
}

@media (max-width: 480px) {
    .page-wrapper {
        padding: 48px 10px;
        align-items: flex-start;
        min-height: 100dvh;
    }

    .form {
        padding: 22px 18px;
        border-radius: 16px;
        gap: 11px; /* větší mezery mezi poli */
    }

    .title {
        font-size: 22px;
    }

    .message {
        font-size: 13px;
        margin-bottom: 4px;
    }

    .form label .input {
        height: 52px; /* původní výška pole */
        font-size: 16px; /* 16px zabrání zoomu na iOS */
    }

    .brand-logo {
        height: 46px;
    }

    .brand-header {
        margin-bottom: 12px;
    }

    label.consent-box {
        padding: 10px 2px;
    }

    /* tlačítko zůstane přilepené dole při scrollu */
    .submit {
        position: sticky;
        bottom: 8px;
        z-index: 10;
        box-shadow: 0 -6px 12px rgba(255, 255, 255, 0.9), 0 4px 12px rgba(65, 74, 158, 0.3);
    }
}
.page-content {
    width: 100%;
    max-width: 580px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.brand-header {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.brand-logo {
    height: 68px;
    width: auto;
    filter: drop-shadow(0 2px 6px rgba(65, 74, 158, 0.15));
}

@media (max-width: 480px) {
    .brand-logo {
        height: 50px;
    }

    .brand-header {
        margin-bottom: 14px;
    }
}

label.consent-box {
    display: flex;
    flex-direction: row;
    flex-wrap: nowrap;
    align-items: center;
    gap: 12px;
    cursor: pointer;
    padding: 16px 4px;
    border-radius: 12px;
    transition: border-color 0.15s ease, background-color 0.15s ease;
    position: relative;
    width: 100%;
}

    label.consent-box:hover {
        background-color: #eef1fb;
        border-color: #c9d2f5;
    }

.consent-input {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.consent-checkmark {
    flex: 0 0 22px;
    width: 22px;
    height: 22px;
    border-radius: 7px;
    border: 2px solid #c3cbef;
    background-color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease;
}

.consent-check-icon {
    width: 14px;
    height: 14px;
    fill: none;
    stroke: #fff;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-dasharray: 24;
    stroke-dashoffset: 24;
    transition: stroke-dashoffset 0.25s ease;
}

.consent-input:checked + .consent-checkmark {
    background-color: royalblue;
    border-color: royalblue;
}

    .consent-input:checked + .consent-checkmark .consent-check-icon {
        stroke-dashoffset: 0;
    }

.consent-input:focus-visible + .consent-checkmark {
    box-shadow: 0 0 0 3px rgba(65, 105, 225, 0.25);
}

.consent-text {
    flex: 1 1 auto;
    font-size: 13.5px;
    color: #444;
    line-height: 1.45;
    margin: 0;
}

    .consent-text a {
        color: royalblue;
        font-weight: 600;
        text-decoration: none;
        border-bottom: 1px solid rgba(65, 105, 225, 0.35);
        transition: border-color 0.15s ease;
    }

        .consent-text a:hover {
            border-color: royalblue;
        }


.consent-box-error {
    background-color: #fdecec;
    border: 1px solid #f3c9c9;
}

    .consent-box-error .consent-checkmark {
        border-color: #d64545;
    }