/*
 * Форма претензии. Цвет кнопок — цвет темы сайта, запасной — #ff4d00.
 *
 * Поля ввода оформляет сама тема Aspro (серый фон, как во всех формах
 * сайта), здесь только размеры. Стили темы подключаются после этого
 * файла, поэтому там, где надо перебить тему, селекторы начинаются с
 * .yx-claim — так они сильнее.
 */
.yx-claim {
    --yx-accent: var(--theme-base-color, #ff4d00);
    --yx-accent-text: #b83700;
    --yx-tint: #ffede5;
    --yx-ink: #15171a;
    --yx-muted: #5f6670;
    --yx-line: #cdd1d6;
    --yx-soft-line: #e3e5e8;
    --yx-radius: 3px;
    max-width: 760px;
    color: var(--yx-ink);
}

/* hidden прячет всегда: Bootstrap делает input[type=file] блоком и перебивает его. */
.yx-claim [hidden] {
    display: none !important;
}

.yx-claim__hint {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    margin-bottom: 20px;
    border-radius: var(--yx-radius);
    background: var(--yx-tint);
    font-size: 15px;
    line-height: 22px;
}

.yx-claim__hint a,
.yx-claim__again {
    color: var(--yx-accent-text);
    font-weight: 600;
}

.yx-claim__form {
    display: flex;
    flex-direction: column;
    gap: 26px;
}

.yx-claim__field {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin: 0;
    padding: 0;
    border: 0;
    min-width: 0;
}

.yx-claim .yx-claim__label {
    width: auto;
    margin: 0;
    padding: 0;
    border: 0;
    color: var(--yx-ink);
    font-size: 16px;
    font-weight: 600;
    line-height: 24px;
}

.yx-claim legend.yx-claim__label {
    margin-bottom: 4px;
}

.yx-claim__muted,
.yx-claim__note {
    color: var(--yx-muted);
    font-size: 14px;
    font-weight: 400;
    line-height: 20px;
}

.yx-claim .yx-claim__input {
    box-sizing: border-box;
    width: 100%;
    height: auto;
    padding: 12px 14px;
    font-family: inherit;
    font-size: 16px;
    line-height: 24px;
}

.yx-claim .yx-claim__input--code {
    max-width: 320px;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 0.02em;
}

textarea.yx-claim__input {
    resize: vertical;
    min-height: 120px;
}

.yx-claim__reason-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 10px;
}

.yx-claim .yx-claim__reason {
    display: flex;
    align-items: center;
    gap: 12px;
    min-height: 52px;
    margin: 0;
    padding: 0 14px;
    border: 1px solid var(--yx-soft-line);
    border-radius: var(--yx-radius);
    font-size: 15px;
    font-weight: 400;
    cursor: pointer;
}

.yx-claim__reason input {
    width: 20px;
    height: 20px;
    margin: 0;
    flex: none;
    accent-color: var(--yx-accent);
}

.yx-claim__reason:has(input:checked) {
    border-color: var(--yx-accent);
    background: var(--yx-tint);
}

.yx-claim__files-head {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
}

.yx-claim__drop {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
    padding: 24px 16px;
    border: 1.5px dashed #b8bdc4;
    border-radius: var(--yx-radius);
    text-align: center;
}

.yx-claim__drop[hidden] {
    display: none;
}

.yx-claim__drop.is-over {
    border-color: var(--yx-accent);
    background: var(--yx-tint);
}

.yx-claim__pick {
    min-height: 44px;
    padding: 0 20px;
    border: 1.5px solid var(--yx-accent);
    border-radius: var(--yx-radius);
    background: #fff;
    color: var(--yx-accent-text);
    font: inherit;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
}

.yx-claim__files {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 10px;
    margin: 0;
    padding: 0;
    list-style: none;
}

.yx-claim__files:empty {
    display: none;
}

.yx-claim__file {
    display: flex;
    align-items: center;
    gap: 12px;
    margin: 0;
    padding: 8px;
    border: 1px solid var(--yx-soft-line);
    border-radius: var(--yx-radius);
}

.yx-claim__file::before {
    content: none;
}

.yx-claim__thumb {
    width: 56px;
    height: 56px;
    flex: none;
    overflow: hidden;
    border-radius: 8px;
    background: #8c939c;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    font-weight: 600;
}

.yx-claim__thumb--video {
    background: #3a3f47;
}

.yx-claim__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.yx-claim__file-info {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.yx-claim__file-name {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 14px;
    font-weight: 500;
}

.yx-claim__progress {
    height: 4px;
    margin-top: 4px;
    overflow: hidden;
    border-radius: 2px;
    background: #eceef1;
}

.yx-claim__progress span {
    display: block;
    width: 0;
    height: 100%;
    background: var(--yx-accent);
    transition: width 0.2s;
}

.yx-claim__file.is-done .yx-claim__progress {
    visibility: hidden;
}

.yx-claim__remove {
    width: 40px;
    height: 40px;
    flex: none;
    border: 0;
    border-radius: 20px;
    background: #f2f3f5;
    color: #3f454d;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.yx-claim__error {
    padding: 12px 16px;
    border-radius: var(--yx-radius);
    background: #fdecea;
    color: #8a1c12;
    font-size: 15px;
    line-height: 22px;
}

.yx-claim__error[hidden],
.yx-claim__done[hidden],
.yx-claim__form[hidden],
.yx-claim__hint[hidden] {
    display: none;
}

.yx-claim__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 12px 20px;
}

.yx-claim .yx-claim__submit {
    min-height: 52px;
    padding: 0 32px;
    font-weight: 700;
}

.yx-claim__submit[disabled] {
    opacity: 0.6;
}

.yx-claim__trap {
    position: absolute;
    left: -10000px;
    width: 1px;
    height: 1px;
    overflow: hidden;
}

.yx-claim__done {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 10px;
    padding: 28px 24px;
    border-radius: var(--yx-radius);
    background: #f2f3f5;
    outline: none;
}

.yx-claim__done-icon {
    width: 56px;
    height: 56px;
    border-radius: 28px;
    background: #e6f4ec;
    color: #1a7a42;
    display: flex;
    align-items: center;
    justify-content: center;
}

.yx-claim__done-title {
    margin: 0;
    font-size: 22px;
}

.yx-claim__done-text {
    margin: 0;
    font-size: 16px;
    line-height: 24px;
}

/* На телефоне перетаскивать некуда: остаётся одна кнопка выбора. */
@media (max-width: 767px) {
    .yx-claim__drop-text {
        display: none;
    }

    .yx-claim__drop {
        padding: 12px;
    }
}

@media (max-width: 600px) {
    .yx-claim .yx-claim__input--code {
        max-width: none;
    }

    .yx-claim__actions .btn {
        width: 100%;
    }
}
