﻿/* ══════════════════════════════════════
   Support Page Styles
   ══════════════════════════════════════ */


html {
    overflow-x: hidden;
}

body {
    overflow-x: hidden;
    width: 100%;
    max-width: 100vw;
}


:root {
    --ashley-blue: #1f3b73;
    --ashley-blue-dark: #17305d;
    --ashley-gold: #c8a96b;
    --ashley-cream: #f8f5ef;
    --ashley-text: #2f2f2f;
    --ashley-border: #d9d2c5;
    --ashley-orange: #eb8e38;
}

html, body {
    font-family: Arial, Helvetica, sans-serif;
    background: linear-gradient(180deg, #fbfaf7 0%, #f4efe5 100%);
    color: var(--ashley-text);
    margin: 0;
}

* {
    box-sizing: border-box;
}


/* ── Language ── */
.lang-toggle {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 16px;
}

.lang-toggle-group {
    display: flex;
    background: #f0f0f0;
    border-radius: 20px;
    padding: 3px;
    gap: 2px;
}

    .lang-toggle-group button {
        border: none;
        background: transparent;
        padding: 6px 16px;
        border-radius: 18px;
        font-size: 0.85rem;
        font-weight: 500;
        color: #666;
        cursor: pointer;
        transition: all 0.25s ease;
    }

        .lang-toggle-group button.active {
            background: #F68C2C;
            color: white;
            box-shadow: 0 1px 4px rgba(246, 140, 44, 0.3);
        }

        .lang-toggle-group button:not(.active):hover {
            color: #363534;
        }


/* ── Layout ── */

.support-page {
    max-width: none;
    margin: 80px;
}

.form-panel {
    background: white;
    border: 1px solid var(--ashley-border);
    border-radius: 18px;
    padding: 28px;
    box-shadow: 0 10px 25px rgba(31, 59, 115, 0.08);
}

/* ── Hero ── */

.eyebrow {
    color: var(--ashley-gold);
    font-size: 13px;
    letter-spacing: 2px;
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 10px;
}

.hero-copy {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--ashley-border);
}

    .hero-copy h1 {
        color: var(--ashley-orange);
        margin-top: 0;
        margin-bottom: 12px;
        font-size: 30px;
        line-height: 1.15;
    }

.hero-text {
    line-height: 1.6;
    font-size: 16px;
}

/* ── Loading Spinner ── */
.spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
    vertical-align: middle;
    margin-right: 6px;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ── Form Controls ── */

.form-group {
    margin-bottom: 18px;
}

    .form-group label {
        display: block;
        margin-bottom: 8px;
        font-weight: 700;
        color: var(--ashley-orange);
    }

.form-control {
    width: 100%;
    border: 1px solid var(--ashley-border);
    border-radius: 12px;
    padding: 12px 14px;
    font-size: 15px;
    transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

    .form-control:focus {
        outline: none;
        border-color: var(--ashley-gold);
        box-shadow: 0 0 0 4px rgba(200, 169, 107, 0.2);
    }

.textarea-control {
    min-height: 160px;
    resize: vertical;
}

.req {
    color: #d32f2f;
}

.validation-message {
    color: #d32f2f;
    font-size: 0.85rem;
    margin-top: 4px;
}

.validation-msg {
    color: #d32f2f;
    font-size: 0.9rem;
    margin-bottom: 8px;
}

/* ── Fieldset Sections ── */

.form-section {
    border: 1px solid var(--ashley-border);
    border-radius: 12px;
    padding: 24px 28px;
    margin-bottom: 24px;
}

    .form-section legend {
        font-size: 1.1rem;
        font-weight: 600;
        color: #1a1a1a;
        padding: 0 8px;
    }

.nested {
    margin-left: 16px;
    padding-left: 16px;
    border-left: 3px solid var(--ashley-border);
}

/* ── Order Lookup ── */

.order-lookup-section {
    background: #f8f9fa;
    border: 1px solid #e2e5e9;
    border-radius: 10px;
    padding: 24px 28px;
    margin-bottom: 28px;
}

    .order-lookup-section legend {
        font-size: 1.1rem;
        font-weight: 600;
        color: #1a1a1a;
    }

.lookup-toggle {
    display: flex;
    border: 2px solid #2a2a2a;
    border-radius: 8px;
    overflow: hidden;
}

.toggle-btn {
    flex: 1;
    padding: 12px 16px;
    border: none;
    border-right: 1px solid #2a2a2a;
    background: #fff;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 500;
    transition: background 0.2s, color 0.2s;
}

    .toggle-btn:last-child {
        border-right: none;
    }

    .toggle-btn.active {
        background: #2a2a2a;
        color: #fff;
    }

    .toggle-btn:not(.active):hover {
        background: #f0f0f0;
    }

.lookup-row {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.lookup-btn {
    padding: 10px 24px;
    background: #2c2c2c;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    transition: background 0.2s;
    height: 42px;
}

    .lookup-btn:hover:not(:disabled) {
        background: #444;
    }

    .lookup-btn:disabled {
        opacity: 0.5;
        cursor: not-allowed;
    }

.lookup-msg {
    margin-top: 8px;
    font-size: 0.85rem;
    line-height: 1.4;
}

    .lookup-msg.success {
        color: #2e7d32;
    }

    .lookup-msg.error {
        color: #d32f2f;
    }

.lookup-skip {
    margin-top: 10px;
    font-size: 0.84rem;
    color: #777;
}

/* ── Order Picker (email/phone results) ── */

.order-picker {
    margin-top: 12px;
}

.order-picker-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 8px;
}

.order-summary-card {
    display: flex;
    flex-direction: column;
    gap: 6px;
    padding: 14px 16px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    text-align: left;
    width: 100%;
    transition: border-color 0.2s, background 0.2s;
}

    .order-summary-card:hover {
        border-color: #888;
        background: #fafafa;
    }

.order-summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.order-summary-name {
    font-weight: 600;
    font-size: 1em;
}

.order-summary-date {
    font-size: 0.85em;
    color: #666;
}

.order-summary-address {
    font-size: 0.9em;
    color: #555;
}

.order-summary-items {
    list-style: disc;
    padding: 0 0 0 20px;
    margin: 4px 0 0 0;
    font-size: 0.85em;
    color: #444;
}

    .order-summary-items li {
        padding: 2px 0;
    }

    .order-summary-items .more-items {
        color: #888;
        font-style: italic;
    }

/* ── Product Picker (damage item selection) ── */

.order-product-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.product-card {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    background: #fff;
    cursor: pointer;
    text-align: left;
    position: relative;
    transition: border-color 0.2s;
    width: 100%;
}

    .product-card:hover {
        border-color: #888;
    }

    .product-card.selected {
        border-color: #2a6e2a;
        background: #f0f8f0;
    }

.product-card-img {
    width: 64px;
    height: 64px;
    object-fit: contain;
    border-radius: 4px;
    flex-shrink: 0;
}

.product-card-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.product-card-name {
    font-weight: 600;
}

.product-card-sku {
    font-size: 0.85em;
    color: #666;
}

.product-card-qty {
    font-size: 0.85em;
    color: #666;
}

.product-card-check {
    position: absolute;
    top: 8px;
    right: 12px;
    color: #2a6e2a;
    font-weight: bold;
    font-size: 1.2em;
}

/* ── Confirmation Modal ── */

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-box {
    background: white;
    border-radius: 8px;
    padding: 24px 28px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.2);
}

    .modal-box p {
        margin: 0 0 16px;
        color: #333;
        line-height: 1.5;
    }

.modal-close-btn {
    background: #d32f2f;
    color: white;
    border: none;
    padding: 8px 24px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
}

.order-confirm-modal {
    background: #fff;
    border-radius: 12px;
    padding: 32px;
    max-width: 560px;
    width: 92%;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
    max-height: 80vh;
    overflow-y: auto;
}

    .order-confirm-modal h2 {
        margin: 0 0 4px;
        font-size: 1.25rem;
        color: #1a1a1a;
    }

    .order-confirm-modal .modal-subtitle {
        color: #666;
        font-size: 0.88rem;
        margin: 0 0 20px;
    }

.order-detail-group {
    margin-bottom: 18px;
}

    .order-detail-group h4 {
        font-size: 0.78rem;
        text-transform: uppercase;
        letter-spacing: 0.06em;
        color: #999;
        margin: 0 0 6px;
    }

    .order-detail-group p {
        margin: 0;
        font-size: 0.95rem;
        color: #333;
        line-height: 1.5;
    }

.order-items-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

    .order-items-list li {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 10px 12px;
        background: #f8f9fa;
        border-radius: 6px;
        margin-bottom: 6px;
        font-size: 0.9rem;
    }

    .order-items-list .item-name {
        color: #1a1a1a;
        font-weight: 500;
    }

    .order-items-list .item-sku {
        color: #888;
        font-size: 0.8rem;
    }

    .order-items-list .item-qty {
        color: #666;
        font-size: 0.82rem;
        white-space: nowrap;
        margin-left: auto;
    }

.order-item-img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 6px;
    flex-shrink: 0;
}

.modal-actions {
    display: flex;
    gap: 10px;
    margin-top: 24px;
}

.modal-confirm-btn {
    flex: 1;
    padding: 11px 20px;
    background: #2e7d32;
    color: #fff;
    border: none;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

    .modal-confirm-btn:hover {
        background: #256b29;
    }

.modal-cancel-btn {
    flex: 1;
    padding: 11px 20px;
    background: #fff;
    color: #333;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
}

    .modal-cancel-btn:hover {
        background: #f5f5f5;
    }

/* ── Buttons ── */

.submit-button {
    background: var(--ashley-orange);
    color: white;
    border: 0;
    border-radius: 999px;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
}

    .submit-button:hover:enabled {
        background: #d47a2e;
    }

    .submit-button:disabled {
        opacity: 0.7;
        cursor: not-allowed;
    }

.remove-item-btn {
    background: none;
    border: 1px solid #d32f2f;
    color: #d32f2f;
    padding: 6px 14px;
    border-radius: 6px;
    font-size: 0.85rem;
    cursor: pointer;
    margin-bottom: 16px;
    transition: background 0.2s;
}

    .remove-item-btn:hover {
        background: #fff1f1;
    }

.add-item-row {
    text-align: center;
}

.add-item-btn {
    background: none;
    border: 2px dashed var(--ashley-border);
    color: var(--ashley-orange);
    padding: 12px 28px;
    border-radius: 10px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}

    .add-item-btn:hover {
        border-color: var(--ashley-orange);
        background: #fff8f2;
    }

.remove-file-btn {
    background: none;
    border: none;
    color: #d32f2f;
    cursor: pointer;
    margin-left: 8px;
    font-size: 0.85rem;
}

    .remove-file-btn:hover {
        color: #b71c1c;
    }

/* ── Misc ── */

.disclaimer {
    background: #fffbf0;
    border: 1px solid #e8dcc8;
    border-radius: 8px;
    padding: 16px 20px;
    font-size: 0.85rem;
    line-height: 1.6;
    color: #5a4e3c;
    margin-top: 16px;
    margin-bottom: 8px;
}

.field-help {
    font-size: 0.84rem;
    color: #777;
    margin-top: 6px;
    line-height: 1.5;
}

.radio-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 6px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400 !important;
    color: var(--ashley-text) !important;
    cursor: pointer;
}

.uploaded-file-list {
    list-style: none;
    padding: 0;
    margin: 10px 0 0;
}

    .uploaded-file-list li {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 8px 12px;
        background: #f8f9fa;
        border-radius: 6px;
        margin-bottom: 4px;
        font-size: 0.88rem;
    }

.status-banner {
    margin-top: 18px;
    border-radius: 12px;
    padding: 14px 16px;
    font-weight: 600;
}

.status-success {
    background: #edf8f0;
    color: #15693a;
    border: 1px solid #bfe3c8;
}

.status-error {
    background: #fff1f1;
    color: #9b1c1c;
    border: 1px solid #f0c2c2;
}

/* ══════════════════════════════════════
   MOBILE RESPONSIVE
   ══════════════════════════════════════ */

@media (max-width: 768px) {
    .support-page {
        margin: 16px;
    }

    .form-panel {
        padding: 16px;
        border-radius: 12px;
    }

    .hero-copy h1 {
        font-size: 22px;
    }

    .hero-text {
        font-size: 14px;
    }

    .eyebrow {
        font-size: 11px;
    }

    .form-section {
        padding: 16px;
        margin-bottom: 16px;
        border-radius: 10px;
    }

        .form-section legend {
            font-size: 0.95rem;
        }

    .order-lookup-section {
        padding: 16px;
    }

    .form-control {
        padding: 10px 12px;
        font-size: 14px;
        border-radius: 8px;
    }

    .form-group label {
        font-size: 0.88rem;
        margin-bottom: 6px;
    }

    .form-group {
        margin-bottom: 14px;
    }

    .textarea-control {
        min-height: 120px;
    }

    .nested {
        margin-left: 8px;
        padding-left: 12px;
    }

    .disclaimer {
        padding: 12px 14px;
        font-size: 0.78rem;
        line-height: 1.55;
    }

    .field-help {
        font-size: 0.78rem;
    }

    .submit-button {
        width: 100%;
        padding: 14px 20px;
        font-size: 15px;
    }

    .lookup-btn {
        width: 100%;
        padding: 12px 20px;
    }

    .lookup-row {
        flex-direction: column;
    }

    .status-banner {
        font-size: 0.88rem;
        padding: 12px 14px;
    }

    .add-item-btn {
        width: 100%;
        padding: 14px 20px;
    }

    .modal-box {
        padding: 20px;
        width: 94%;
    }

    .order-confirm-modal {
        padding: 20px;
        width: 94%;
        max-height: 85vh;
    }

        .order-confirm-modal h2 {
            font-size: 1.1rem;
        }

    .modal-actions {
        flex-direction: column;
        gap: 8px;
    }

    .modal-confirm-btn, .modal-cancel-btn {
        width: 100%;
        padding: 13px 20px;
    }

    .uploaded-file-list li {
        font-size: 0.82rem;
        padding: 8px 10px;
    }

    .order-items-list li {
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
        font-size: 0.85rem;
    }
}

@media (max-width: 480px) {
    .support-page {
        margin: 8px;
    }

    .form-panel {
        padding: 12px;
        border-radius: 10px;
        border: none;
        box-shadow: none;
    }

    .hero-copy h1 {
        font-size: 20px;
    }

    .form-section {
        padding: 12px;
        border-radius: 8px;
    }

        .form-section legend {
            font-size: 0.88rem;
        }

    .order-lookup-section {
        padding: 12px;
    }

    .form-control {
        padding: 10px;
        font-size: 14px;
    }

    .radio-label {
        font-size: 0.88rem;
    }

    .disclaimer {
        font-size: 0.75rem;
    }
}
