:root {
    --p24-bg: #e7ece9;
    --p24-panel: #ffffff;
    --p24-ink: #07345d;
    --p24-muted: #5d6a75;
    --p24-line: #d8dfdc;
    --p24-accent: #ff4f77;
    --p24-accent-dark: #e73762;
    --p24-soft: #f4f6f7;
}

* {
    box-sizing: border-box;
}

body.p24-page {
    min-height: 100vh;
    margin: 0;
    padding: 14px;
    background:
        linear-gradient(180deg, rgba(255, 255, 255, 0.62), rgba(255, 255, 255, 0)),
        var(--p24-bg);
    color: var(--p24-ink);
    font-family: Arial, Helvetica, sans-serif;
}

.p24-shell {
    width: min(620px, 100%);
    margin: 0 auto;
}

.p24-card {
    background: var(--p24-panel);
    border: 1px solid var(--p24-line);
    border-radius: 8px;
    box-shadow: 0 18px 42px rgba(7, 52, 93, 0.12);
    overflow: hidden;
}

.p24-header {
    padding: 18px 22px 14px;
    border-left: 5px solid var(--p24-accent);
    background: var(--p24-panel);
}

.p24-event-name {
    margin: 0 0 10px;
    color: var(--p24-ink);
    font-size: 15px;
    font-weight: 900;
    line-height: 1.25;
}

.p24-eyebrow {
    margin: 0 0 6px;
    color: var(--p24-accent);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0;
    text-transform: uppercase;
}

.p24-title {
    margin: 0;
    color: var(--p24-ink);
    font-size: 24px;
    line-height: 1.15;
}

.p24-desc {
    margin: 8px 0 0;
    color: var(--p24-muted);
    font-size: 14px;
    line-height: 1.5;
}

.p24-form {
    padding: 16px 22px 18px;
}

.p24-required-note {
    margin: 0 0 12px;
    padding: 9px 12px;
    border: 1px solid rgba(255, 79, 119, 0.32);
    border-left: 5px solid var(--p24-accent);
    border-radius: 6px;
    background: rgba(255, 79, 119, 0.08);
    color: var(--p24-ink);
    font-size: 13px;
    font-weight: 900;
}

.p24-field {
    margin-bottom: 11px;
}

.p24-label {
    display: block;
    margin-bottom: 5px;
    color: var(--p24-ink);
    font-size: 13px;
    font-weight: 800;
    text-transform: uppercase;
}

.p24-field-hint {
    margin: 5px 0 0;
    padding-left: 10px;
    border-left: 3px solid var(--p24-line);
    color: var(--p24-muted);
    font-size: 12px;
    font-weight: 700;
    line-height: 1.45;
}

.p24-input,
.p24-select {
    width: 100%;
    min-height: 44px;
    padding: 0 13px;
    border: 1px solid var(--p24-line);
    border-radius: 5px;
    background: var(--p24-soft);
    color: #071f37;
    font-size: 16px;
    font-weight: 700;
}

.p24-input:focus,
.p24-select:focus {
    outline: none;
    border-color: var(--p24-accent);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(255, 79, 119, 0.18);
}

.p24-input:required:valid,
.p24-select:required:valid,
.p24-input.is-valid,
.p24-select.is-valid,
.p24-input[name="email"].is-valid,
.p24-input[name="telefon"].is-valid {
    border-color: #30a64a !important;
    background-color: #f1fbf4 !important;
    box-shadow: 0 0 0 3px rgba(48, 166, 74, 0.12) !important;
    -webkit-box-shadow: 0 0 0 1000px #f1fbf4 inset, 0 0 0 3px rgba(48, 166, 74, 0.12) !important;
}

.p24-input:required:focus:valid,
.p24-select:required:focus:valid,
.p24-input.is-valid:focus,
.p24-select.is-valid:focus,
.p24-input[name="email"].is-valid:focus,
.p24-input[name="telefon"].is-valid:focus {
    border-color: #30a64a !important;
    box-shadow: 0 0 0 3px rgba(48, 166, 74, 0.18) !important;
    -webkit-box-shadow: 0 0 0 1000px #f1fbf4 inset, 0 0 0 3px rgba(48, 166, 74, 0.18) !important;
}

.p24-select {
    appearance: none;
    background-image:
        linear-gradient(45deg, transparent 50%, var(--p24-ink) 50%),
        linear-gradient(135deg, var(--p24-ink) 50%, transparent 50%);
    background-position:
        calc(100% - 20px) 21px,
        calc(100% - 14px) 21px;
    background-size: 6px 6px, 6px 6px;
    background-repeat: no-repeat;
}

.p24-ticket-grid {
    display: flex;
    flex-wrap: nowrap;
    gap: 14px;
    align-items: start;
}

.p24-ticket-grid .p24-field {
    width: calc(50% - 7px);
    min-width: 0;
}

.p24-total {
    display: flex;
    align-items: center;
    width: 100%;
    min-height: 44px;
    padding: 0 13px;
    border: 1px solid #30a64a;
    border-radius: 5px;
    background: #f1fbf4;
    color: #177332;
    cursor: default;
    font-size: 16px;
    font-weight: 900;
    box-shadow: 0 0 0 3px rgba(48, 166, 74, 0.12);
    user-select: none;
}

.p24-checkbox {
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 10px;
    align-items: start;
    margin: 14px 0;
    padding: 11px 12px;
    border: 1px solid var(--p24-line);
    border-radius: 6px;
    background: #fff;
    color: var(--p24-muted);
    font-size: 14px;
    line-height: 1.45;
}

.p24-checkbox:has(input:checked) {
    border-color: #30a64a;
    background: #f1fbf4;
}

.p24-checkbox input {
    width: 20px;
    height: 20px;
    margin: 0;
    accent-color: var(--p24-accent);
}

.p24-checkbox a {
    color: var(--p24-accent-dark);
    font-weight: 800;
    text-decoration: none;
}

.p24-checkbox a:hover {
    text-decoration: underline;
}

.p24-submit {
    width: 100%;
    min-height: 48px;
    border: 0;
    border-radius: 999px;
    background: var(--p24-accent);
    color: #fff;
    cursor: pointer;
    font-size: 16px;
    font-weight: 900;
    box-shadow: 0 9px 18px rgba(255, 79, 119, 0.28);
    transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.p24-submit:hover,
.p24-submit:focus {
    background: var(--p24-accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(255, 79, 119, 0.34);
}

.p24-message {
    padding: 22px;
    color: var(--p24-ink);
    text-align: center;
}

.p24-message-title {
    margin: 0;
    color: var(--p24-ink);
    font-size: 20px;
    font-weight: 900;
    line-height: 1.35;
}

.p24-result-sections {
    display: grid;
    gap: 10px;
    max-width: 520px;
    margin: 20px auto 0;
    text-align: left;
}

.p24-result-section {
    padding: 13px 14px;
    border: 1px solid var(--p24-line);
    border-left: 5px solid var(--p24-accent);
    border-radius: 7px;
    background: var(--p24-soft);
}

.p24-result-label {
    display: block;
    margin-bottom: 4px;
    color: var(--p24-accent-dark);
    font-size: 12px;
    font-weight: 900;
    text-transform: uppercase;
}

.p24-result-section p {
    margin: 0;
    color: var(--p24-muted);
    font-size: 14px;
    font-weight: 700;
    line-height: 1.55;
}

.p24-result-section a {
    color: var(--p24-accent-dark);
    font-weight: 900;
    text-decoration: none;
}

.p24-result-section a:hover {
    text-decoration: underline;
}

.p24-return-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 48px;
    margin-top: 20px;
    padding: 0 24px;
    border-radius: 999px;
    background: var(--p24-accent);
    color: #fff;
    font-size: 15px;
    font-weight: 900;
    text-decoration: none;
    box-shadow: 0 9px 18px rgba(255, 79, 119, 0.28);
    transition: transform 0.16s ease, background 0.16s ease, box-shadow 0.16s ease;
}

.p24-return-btn:hover {
    background: var(--p24-accent-dark);
    transform: translateY(-1px);
    box-shadow: 0 12px 22px rgba(255, 79, 119, 0.34);
}

@media (max-width: 520px) {
    body.p24-page {
        padding: 8px;
    }

    .p24-card {
        border-radius: 6px;
    }

    .p24-header,
    .p24-form {
        padding-left: 16px;
        padding-right: 16px;
    }

    .p24-title {
        font-size: 21px;
    }

    .p24-field {
        margin-bottom: 10px;
    }

    .p24-ticket-grid {
        display: flex;
        flex-wrap: nowrap;
        gap: 8px;
    }

    .p24-ticket-grid .p24-field {
        width: calc(50% - 4px);
    }

    .p24-input,
    .p24-select,
    .p24-submit {
        min-height: 46px;
    }
}
