* {
    box-sizing: border-box;
}

:root {
    color-scheme: light;
    --dark: #173a43;
    --accent: #176a75;
    --accent-light: #e0f0f2;
    --background: #f1f5f6;
    --border: #d8e2e4;
    --muted: #57727a;
    --error: #9f2f2f;
    --error-bg: #fff0f0;
}

body {
    margin: 0;
    background: var(--background);
    color: var(--dark);
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Arial,
        sans-serif;
}

.page {
    width: min(860px, calc(100% - 32px));
    margin: 48px auto;
}

.intro,
.request-form,
.errors,
.success-card {
    background: #fff;
    border-radius: 18px;
    box-shadow: 0 14px 40px rgba(19, 66, 77, 0.09);
}

.intro {
    padding: 38px 42px;
    margin-bottom: 22px;
}

.brand {
    display: inline-block;
    padding: 7px 12px;
    margin-bottom: 16px;
    border-radius: 999px;
    background: var(--accent-light);
    color: var(--accent);
    font-size: 14px;
    font-weight: 750;
}

h1 {
    margin: 0 0 14px;
    font-size: clamp(30px, 5vw, 44px);
    line-height: 1.1;
}

p {
    margin: 0;
    color: var(--muted);
    font-size: 17px;
    line-height: 1.55;
}

.request-form {
    padding: 38px 42px;
}

.section-title {
    margin: 8px 0 18px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border);
    font-size: 20px;
    font-weight: 750;
}

.section-title:not(:first-child) {
    margin-top: 34px;
}

label {
    display: grid;
    gap: 8px;
    margin-bottom: 18px;
    font-size: 15px;
    font-weight: 650;
}

input,
textarea,
select {
    width: 100%;
    padding: 13px 14px;
    border: 1px solid #bccdd1;
    border-radius: 10px;
    background: #fff;
    color: var(--dark);
    font: inherit;
    font-weight: 400;
}

textarea {
    resize: vertical;
    line-height: 1.45;
}

input:focus,
textarea:focus,
select:focus {
    outline: 3px solid rgba(23, 106, 117, 0.14);
    border-color: var(--accent);
}

.two-columns {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 18px;
}

.upload span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 400;
}

.consent {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    margin-top: 26px;
    color: var(--muted);
    font-size: 14px;
    font-weight: 400;
    line-height: 1.45;
}

.consent input {
    width: 18px;
    height: 18px;
    margin-top: 1px;
    flex: 0 0 auto;
}

button,
.secondary-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 50px;
    padding: 0 24px;
    border: 0;
    border-radius: 11px;
    background: var(--accent);
    color: #fff;
    font-size: 17px;
    font-weight: 750;
    text-decoration: none;
    cursor: pointer;
}

button {
    width: 100%;
    margin-top: 8px;
}

button:hover,
.secondary-button:hover {
    background: #115a64;
}

.errors {
    margin-bottom: 22px;
    padding: 22px 26px;
    border: 1px solid #efc5c5;
    background: var(--error-bg);
    color: var(--error);
}

.errors ul {
    margin: 10px 0 0;
    padding-left: 22px;
}

.success-page {
    min-height: calc(100vh - 96px);
    display: grid;
    place-items: center;
}

.success-card {
    width: min(620px, 100%);
    padding: 48px;
    text-align: center;
}

.success-icon {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    margin: 0 auto 22px;
    border-radius: 50%;
    background: #dff3e5;
    color: #207443;
    font-size: 34px;
    font-weight: 800;
}

.request-number {
    margin: 12px 0 22px;
    padding: 14px;
    border-radius: 10px;
    background: var(--accent-light);
    color: var(--accent);
    font-size: clamp(20px, 5vw, 28px);
    font-weight: 800;
    letter-spacing: 0.03em;
}

.secondary-button {
    margin-top: 28px;
}

.honeypot {
    position: absolute !important;
    left: -10000px !important;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

@media (max-width: 680px) {
    .page {
        margin: 18px auto;
    }

    .intro,
    .request-form,
    .success-card {
        padding: 26px 22px;
        border-radius: 14px;
    }

    .two-columns {
        grid-template-columns: 1fr;
        gap: 0;
    }
}


.selected-files {
    display: grid;
    gap: 10px;
    margin-top: 12px;
}

.selected-file {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 14px;
    border: 1px solid var(--border);
    border-radius: 10px;
    background: #f7fafb;
}

.selected-file-info {
    min-width: 0;
    display: grid;
    gap: 4px;
}

.selected-file-info strong {
    overflow-wrap: anywhere;
    color: var(--dark);
    font-size: 14px;
}

.selected-file-info span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 400;
}

.file-remove {
    width: auto;
    min-height: 36px;
    margin: 0;
    padding: 0 14px;
    flex: 0 0 auto;
    border: 1px solid #ddb6b6;
    background: #fff;
    color: #9f2f2f;
    font-size: 14px;
}

.file-remove:hover {
    background: #fff0f0;
}

@media (max-width: 520px) {
    .selected-file {
        align-items: flex-start;
        flex-direction: column;
    }

    .file-remove {
        width: 100%;
    }
}


/* Миниатюры выбранных вложений */

.selected-file {
    display: grid;
    grid-template-columns: 64px minmax(0, 1fr) auto;
    align-items: center;
    gap: 14px;
}

.file-preview {
    width: 64px;
    height: 64px;
    display: grid;
    place-items: center;
    overflow: hidden;
    flex: 0 0 auto;
    border: 1px solid var(--border);
    border-radius: 9px;
    background: #e8f0f1;
}

.file-preview img,
.file-preview video {
    width: 100%;
    height: 100%;
    display: block;
    object-fit: cover;
}

.file-preview video {
    pointer-events: none;
}

.file-preview-generic {
    padding: 4px;
    color: var(--accent);
    font-size: 11px;
    font-weight: 800;
    letter-spacing: 0.04em;
    text-align: center;
    overflow-wrap: anywhere;
}

@media (max-width: 520px) {
    .selected-file {
        display: grid;
        grid-template-columns: 56px minmax(0, 1fr);
        align-items: center;
    }

    .file-preview {
        width: 56px;
        height: 56px;
    }

    .file-remove {
        width: 100%;
        grid-column: 1 / -1;
    }
}
