/* ============================================================
   Design Tokens
   ============================================================ */
:root {
    --color-main-text: #3e3d40;
    --color-border: #D9D9D9;
    --color-white: #FFFFFF;
    --color-primary: #3d3935;
    --color-bg-light: #F9F9F9;
    --color-bg-hover: #F0F0F0;
    --color-grey-96: #F5F5F5;
    --color-grey-85: #D9D9D9;
    --color-grey-75: #BFBFBF;
    --color-red-49: #b2292e;
    --color-accent: #b2292e;
    --color-error: #C8414B;
}


/* ============================================================
   Base / Reset
   ============================================================ */
.support-wrapper {
    color: var(--color-main-text);
}

.support-wrapper h1,
.support-wrapper h2,
.support-wrapper h3,
.support-wrapper p {
    margin: 0;
    padding: 0;
}

.support-wrapper h1 {
    font-weight: 850;
    font-size: 45px;
    line-height: 100%;
}

.support-wrapper h2 {
    font-weight: 500;
    font-size: 24px;
    line-height: 26px;
}


/* ============================================================
   Typography Helpers
   ============================================================ */
.text-XS {
    font-weight: 400;
    font-size: 12px;
    line-height: 16px;
}

.text-M {
    font-weight: 400;
    font-size: 16px;
    line-height: 22px;
}

.text-L {
    font-weight: 400;
    font-size: 18px;
    line-height: 26px;
}

/* ============================================================
   Preloader
   ============================================================ */
.preloader-wrapper {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    padding: 60px 20px;
}

.preloader-ring {
    width: 40px;
    height: 40px;
    border: 3px solid var(--color-bg-light);
    border-top-color: var(--color-main-text);
    border-radius: 50%;
    -webkit-animation: ring-spin 0.9s linear infinite;
    animation: ring-spin 0.9s linear infinite;
}

@-webkit-keyframes ring-spin {
    0%   { -webkit-transform: rotate(0deg);   transform: rotate(0deg); }
    100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}

@keyframes ring-spin {
    0%   { -webkit-transform: rotate(0deg);   transform: rotate(0deg); }
    100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}




/* ============================================================
   Support: Titles & Descriptions
   ============================================================ */
.support-wrapper .support-title {
    margin-bottom: 8px;
}

.support-wrapper .support-subtitle {
    font-weight: 400;
    font-size: 18px;
    line-height: 26px;
    margin-bottom: 50px;
}

.support-wrapper .step-title {
    font-weight: 500;
    font-size: 24px;
    line-height: 26px;
    margin-bottom: 8px;
}

.support-wrapper .step-desc {
    font-weight: 400;
    font-size: 16px;
    line-height: 22px;
    margin-bottom: 15px;
}


/* ============================================================
   Type Cards
   ============================================================ */
.type-cards {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 30px;
    margin-bottom: 50px;
}

.type-card {
    -webkit-box-flex: 1;
    -ms-flex: 1;
    flex: 1;
    background: var(--color-white);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 23px;
    text-align: left;
}

.type-icon {
    margin-bottom: 15px;
}

.type-card h3 {
    font-weight: 500;
    font-size: 20px;
    line-height: 28px;
    margin-bottom: 10px;
}

.type-card p {
    font-weight: 400;
    font-size: 16px;
    line-height: 22px;
    margin-bottom: 15px;
}


/* ============================================================
   Buttons
   ============================================================ */
.support-wrapper .btn {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 5px;
    cursor: pointer;
    border: none;
    -webkit-transition: all 0.3s;
    transition: all 0.3s;
    font-weight: 400;
    font-size: 18px;
    line-height: 26px;
    min-width: 250px;
}

.support-wrapper .btn-primary {
    background: var(--color-primary);
    color: var(--color-white);
}

.support-wrapper .btn-primary:hover {
    background: var(--color-accent);
}

.support-wrapper .btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.support-wrapper .btn-outline {
    padding: 8px 20px;
    background: transparent;
    color: var(--color-primary);
    border: 2px solid var(--color-primary);
}

.support-wrapper .btn-outline:hover {
    background: var(--color-accent);
    color: var(--color-white);
    border: 2px solid var(--color-accent);
}


/* ============================================================
   Info Block
   ============================================================ */
.info-block {
    background: var(--color-bg-light);
    border-radius: 4px;
    padding: 20px;
    margin-bottom: 50px;
}

.info-block-title {
    background: var(--color-white);
    padding: 20px;
    margin-bottom: 15px;
}

.info-block-title h3 {
    font-weight: 500;
    font-size: 24px;
    line-height: 26px;
    margin-bottom: 8px;
}

.info-block-title p {
    font-weight: 400;
    font-size: 16px;
    line-height: 22px;
}

.info-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    background: var(--color-white);
    padding: 20px;
    -webkit-column-gap: 30px;
    column-gap: 30px;
}

.info-grid ul {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 10px;
}

.info-grid ul li {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    gap: 12px;
    font-weight: 400;
    font-size: 16px;
    line-height: 22px;
}

.info-grid ul li::before {
    content: '';
    -ms-flex-negative: 0;
    flex-shrink: 0;
    width: 4px;
    height: 4px;
    background: var(--color-primary);
    border-radius: 50%;
}


/* ============================================================
   Contacts
   ============================================================ */
.support-wrapper .contact-title {
    font-weight: 500;
    font-size: 24px;
    line-height: 26px;
    margin-bottom: 15px;
}

.contact-blocks {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 30px;
}

.contact-block {
    background: var(--color-bg-light);
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 15px;
}

.contact-name {
    font-weight: 400;
    font-size: 14px;
    line-height: 20px;
    margin-bottom: 5px;
}

.contact-desc {
    font-weight: 400;
    font-size: 18px;
    line-height: 26px;
    color: #000;
}


/* ============================================================
   Form: Head
   ============================================================ */
.form-head {
    margin-top: 20px;
    margin-bottom: 50px;
}

.form-head .form-title {
    margin-top: 50px;
    margin-bottom: 10px;
}

.back-link {
    color: var(--color-main-text);
}


/* ============================================================
   Form: Section & Groups
   ============================================================ */
.form-section {
    padding: 30px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 20px;
    border-radius: 8px;
    border: 1px solid var(--color-border);
    margin-bottom: 30px;
}

.form-group label {
    margin-bottom: 8px;
}

.form-group {
    position: relative;
}

/* ============================================================
   Form: Inputs
   ============================================================ */
.support-input {
    padding: 12px 20px;
    border-radius: 6px;
    border: 1px solid var(--color-border);
    width: 100%;
    outline: none !important;
}

.support-input.has-error {
    border: 1px solid var(--color-error);
}

.support-input.focus-visible {
    -webkit-box-shadow: unset;
    box-shadow: unset;
}

.support-input:disabled {
    background-color: var(--color-grey-96);
}

.support-input::-webkit-input-placeholder {
    font-weight: 400;
    font-size: 16px;
    line-height: 22px;
    color: var(--color-grey-75);
}
.support-input::-moz-placeholder {
    font-weight: 400;
    font-size: 16px;
    line-height: 22px;
    color: var(--color-grey-75);
    opacity: 1;
}
.support-input:-ms-input-placeholder {
    font-weight: 400;
    font-size: 16px;
    line-height: 22px;
    color: var(--color-grey-75);
}
.support-input::placeholder {
    font-weight: 400;
    font-size: 16px;
    line-height: 22px;
    color: var(--color-grey-75);
}

.support-wrapper textarea {
    resize: vertical;
    min-height: 120px;
}

.support-wrapper input, .support-wrapper select, .support-wrapper textarea, [required] {
  scroll-margin-top: 100px;
}


/* ============================================================
   Form: Validation / Errors
   ============================================================ */
.input-error {
    display: none;
    font-size: 12px;
    line-height: 16px;
    color: var(--color-error);
    margin-top: 8px;
}

.input-error.show {
    display: block;
}

.input-hint {
    color: var(--color-grey-75);
    margin-top: 8px;
}

.input-hint.is-error {
    color: var(--color-error);
}


/* ============================================================
   Autocomplete
   ============================================================ */
.autocomplete-list {
    position: absolute;
    width: 100%;
    background-color: var(--color-white);
    z-index: 1;
    margin-top: 8px;
    border-radius: 6px;
    border: 1px solid var(--color-border);
    display: none;
    max-height: 300px;
    overflow: auto;
}

.autocomplete-item {
    cursor: pointer;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 10px;
    padding: 10px 15px;
}

.autocomplete-item:hover {
    background-color: var(--color-grey-96);
}

.product-thumb {
    width: 40px;
    height: 40px;
    border: 1px solid var(--color-border);
    border-radius: 4px;
    padding: 6px;
}

.product-thumb img {
    width: 100%;
    height: 100%;
    -o-object-fit: cover;
    object-fit: cover;
}

.product-meta {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 15px;
    color: var(--color-grey-75);
}


/* ============================================================
   Layout Helpers
   ============================================================ */
.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
}


/* ============================================================
   Checkbox
   ============================================================ */
.checkbox-label {
    width: -webkit-fit-content;
    width: -moz-fit-content;
    width: fit-content;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 10px;
}

.checkbox-label [type="checkbox"] {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}


/* ============================================================
   Input Wrapper with Clear Button
   ============================================================ */
.input-wrapper {
    position: relative;
    width: 100%;
}

.input-wrapper .support-input {
    padding-right: 40px;
}

.input-clear {
    position: absolute;
    right: 10px;
    top: 50%;
    -webkit-transform: translateY(-50%);
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    border: none;
    background: transparent;
    cursor: pointer;
    color: var(--color-grey-75);
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    padding: 0;
    -webkit-transition: color 0.2s;
    transition: color 0.2s;
}

.input-clear:hover {
    color: var(--color-main-text);
}

.input-clear.hidden {
    display: none;
}


/* ============================================================
   File Upload
   ============================================================ */
.file-upload-zone {
    background: var(--color-grey-96);
    border-radius: 8px;
    padding: 20px;
    border: 1px dashed var(--color-border);
}

.file-upload-zone.has-error {
    border-color: var(--color-error);
    background: #fff5f5;
}

.file-upload-zone.has-error .input-hint {
    color: var(--color-error);
}

.file-upload-zone .input-hint.is-error {
    color: var(--color-error);
}

.file-list {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    gap: 10px;
    margin: 15px 0;
}

.file-item {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    background: #fff;
    border: 1px solid #E5E5E5;
    border-radius: 6px;
    padding: 12px 15px;
}

.file-item-error {
    border: 1px solid var(--color-error);
}

.file-info {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 10px;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

.file-size {
    color: var(--color-grey-75);
}

.file-status-actions {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 15px;
}

.file-actions {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    gap: 15px;
}

.file-delete,
.file-retry {
    background: none;
    border: none;
    cursor: pointer;
    color: var(--color-red-49);
    text-decoration: underline;
    padding: 0;
}

.file-item-error .file-delete,
.file-item-error .file-retry {
    color: var(--color-error);
}

.file-retry {
    display: -webkit-inline-box;
    display: -ms-inline-flexbox;
    display: inline-flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
    -webkit-box-pack: center;
    -ms-flex-pack: center;
    justify-content: center;
    gap: 6px;
}

.file-retry::before {
    content: '';
    display: inline-block;
    width: 16px;
    height: 16px;
    -ms-flex-negative: 0;
    flex-shrink: 0;
    background-color: var(--color-error);
    -webkit-mask-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 8C2 6.4087 2.63214 4.88258 3.75736 3.75736C4.88258 2.63214 6.4087 2 8 2C9.67737 2.00631 11.2874 2.66082 12.4933 3.82667L14 5.33333M10.6667 5.33333H14V2M14 8C14 9.5913 13.3679 11.1174 12.2426 12.2426C11.1174 13.3679 9.5913 14 8 14C6.32263 13.9937 4.71265 13.3392 3.50667 12.1733L2 10.6667M2 14V10.6667H5.33333' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    mask-image: url("data:image/svg+xml,%3Csvg width='16' height='16' viewBox='0 0 16 16' fill='none' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M2 8C2 6.4087 2.63214 4.88258 3.75736 3.75736C4.88258 2.63214 6.4087 2 8 2C9.67737 2.00631 11.2874 2.66082 12.4933 3.82667L14 5.33333M10.6667 5.33333H14V2M14 8C14 9.5913 13.3679 11.1174 12.2426 12.2426C11.1174 13.3679 9.5913 14 8 14C6.32263 13.9937 4.71265 13.3392 3.50667 12.1733L2 10.6667M2 14V10.6667H5.33333' stroke='black' stroke-width='1.5' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
    -webkit-mask-size: contain;
    mask-size: contain;
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-transition: -webkit-transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    transition: -webkit-transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
    transition: transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1), -webkit-transform 0.6s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.file-retry:hover::before {
    -webkit-transform: rotate(180deg);
    transform: rotate(180deg);
}

.status-text {
    color: var(--color-red-49);
}

.status-text.error {
    color: var(--color-error);
}

.file-name {
    flex: 1 1 auto; 
    min-width: 0;
    
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 500px;
}
.file-size {
    flex: 0 0 auto;
    white-space: nowrap;
}


/* ============================================================
   Success Popup
   ============================================================ */
.support-wrapper .popup-overlay {
    display: none;
    position: fixed;
    z-index: 10000;
    bottom: 0;
    top: 0;
    right: 0;
    width: 100%;
    height: 100%;
    background: #00000099;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

.support-success {
    background-color: var(--color-white);
    width: -webkit-fit-content;
    width: -moz-fit-content;
    width: fit-content;
    margin: auto;
    max-width: 560px;
    padding: 20px;
    border-radius: 8px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -ms-flex-direction: column;
    flex-direction: column;
    text-align: left;
    gap: 15px;
    position: relative;
}

.support-success__title {
    font-weight: 500;
    font-size: 20px;
    line-height: 28px;
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-align: center;
    -ms-flex-align: center;
    align-items: center;
}

.support-success__number #requestNumber {
    font-weight: 700;
}

.support-success__subtitle {
    font-weight: 500;
}

.support-success__close {
    position: absolute;
    top: 5px;
    right: 5px;
    cursor: pointer;
}


/* ============================================================
   Realtime Text Validation
   ============================================================ */
.textarea-bottom-wrapper {
    display: -webkit-box;
    display: -ms-flexbox;
    display: flex;
    -webkit-box-pack: justify;
    -ms-flex-pack: justify;
    justify-content: space-between;
    gap: 15px;
}

.char-counter {
    color: var(--color-grey-75);
    text-align: right;
    margin-top: 8px;
    white-space: nowrap;
}

.char-counter.over-limit {
    color: var(--color-error);
}


/* ============================================================
   Responsive
   ============================================================ */
@media (max-width: 999px) {
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .contact-blocks {
        grid-template-columns: 1fr 1fr;
    }

    .support-wrapper h1 {
        font-weight: 850;
        font-size: 32px;
        line-height: 100%;
    }
    .smart-captcha {
        height: auto !important;
    }
}

@media (max-width: 767px) {
    .grid-3 {
        grid-template-columns: 1fr;
        gap: 15px;
    }

    .form-section {
        padding: 15px;
    }

    .support-wrapper h1 {
        font-size: 24px;
    }

    .type-cards {
        display: -webkit-box;
        display: -ms-flexbox;
        display: flex;
        -webkit-box-orient: vertical;
        -webkit-box-direction: normal;
        -ms-flex-direction: column;
        flex-direction: column;
    }

    .info-grid,
    .contact-blocks {
        grid-template-columns: 1fr;
        gap: 10px;
    }

    .support-wrapper .step-title {
        font-size: 20px;
        line-height: 28px;
    }
    .support-wrapper .support-subtitle {
        margin-bottom: 30px;
    }
    .type-card {
        padding: 20px;
    }
    .type-cards {
        gap: 20px;
        margin-bottom: 30px;
    }
    .support-wrapper .btn {
        width: 100%;
        padding: 10px 20px !important;
        font-size: 18px !important;
        min-width: unset;
    }
    .info-block {
        padding: 15px;
        margin-bottom: 30px;
    }
    .info-block-title h3 {
        font-size: 20px;
        line-height: 28px;
    }
    .support-wrapper .contact-title {
        font-size: 20px;
        line-height: 28px;
    }
    .form-head .form-title {
        margin-top: 30px;
    }
    .form-head {
        margin-bottom: 30px;
    }
    .support-wrapper h2 {
        font-size: 20px;
        line-height: 28px;
    }
    .product-thumb {
        min-width: 40px;
    }
    .product-meta {
        margin-top: 5px;
        flex-direction: column;
        gap: 0;
    }
    .form-section {
        gap: 15px;
    }
    .file-item {
        align-items: stretch;
        flex-direction: column;
        padding: 10px;
    }
    .file-info, .file-status-actions {
        justify-content: space-between;
    }
    .file-upload-zone {
        padding: 15px;
    }
    .popup-overlay {
        padding: 15px;
    }
    .support-success__title svg {
        display: none;
    }
    
}