/**
 * =====================================================================================
 * HELLA 3D MANAGEMENT SUITE: SUPPORT PAGE SPECIFIC STYLESHEET
 * =====================================================================================
 * @file        support.css
 * @description Controls the split layout for the contact form and dynamic FAQ accordion.
 * @version     1.0.0
 * @cleared     Jul 5, 2026
 * * ARCHITECTURE OVERVIEW:
 * 1. Safari Flex Fixes: Explicitly declares min-width: 0 on flex columns to prevent 
 * Safari from bleeding content horizontally outside of bounds.
 * 2. Custom Scrollbars: Implements WebKit pseudo-elements to stylize the internal scroll 
 * of the sticky contact form panel.
 * 3. Input Cloaking: Visually hides the native `<input type="file">` utilizing opacity 
 * and absolute positioning to allow custom UI buttons to proxy the click events.
 * 4. Accordion Transitions: Uses max-height and cubic-bezier timings to smoothly animate 
 * the opening and closing of FAQ items.
 * =====================================================================================
 */

/* --- 1. GLOBAL LAYOUT CONTROLS --- */
html, body {
    overflow-x: hidden; /* Absolute clamp on horizontal rubber-banding */
    width: 100%;
    max-width: 100%;
    position: relative;
}

.page-main-content {
    position: relative;
    z-index: 10; 
    padding-top: 80px; 
    display: flex;
    flex-direction: column;
    align-items: center; 
    width: 100%;
    max-width: 100%;
    overflow-x: hidden;
    box-sizing: border-box;
}

/* --- 2. HERO SECTION --- */
.support-hero {
    text-align: center;
    max-width: 1000px;
    width: calc(100% - 40px);
    margin: 0 auto 4rem auto;
    box-sizing: border-box;
}

.support-hero h1 {
    font-size: 4rem;
    font-weight: 800;
    line-height: 1.1;
    color: #ffffff;
    margin-bottom: 1.5rem;
}

.support-hero h1 span {
    color: #ff3b3b;
}

.support-hero p {
    font-size: 1.2rem;
    color: #b0b0b0;
    line-height: 1.7;
    max-width: 700px;
    margin: 0 auto;
}

/* --- 3. SPLIT LAYOUT (Form Left, FAQ Right) --- */
.support-container {
    max-width: 1600px;
    width: calc(100% - 40px);
    margin: 0 auto 6rem auto;
    display: flex;
    gap: 4rem;
    align-items: flex-start;
    box-sizing: border-box;
}

/* --- 4. CONTACT FORM PANEL --- */
.contact-panel {
    flex: 0 0 450px; 
    min-width: 0; /* SAFARI FIX: Allows flex item to shrink below content width */
    max-width: 100%;
    box-sizing: border-box;
    background-color: var(--glass-bg);
    background-image: var(--glass-noise);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 24px;
    padding: 3rem 2.5rem;
    position: sticky;
    top: 120px; 
    
    max-height: calc(100vh - 140px); 
    overflow-y: auto; 
    overflow-x: hidden; /* Kills internal horizontal scrollbars */
    
    transform: translateZ(0); 
    -webkit-transform: translateZ(0);
    
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 59, 59, 0.5) transparent;
}

.contact-panel::-webkit-scrollbar { width: 6px; }
.contact-panel::-webkit-scrollbar-track { background: transparent; margin: 10px 0; }
.contact-panel::-webkit-scrollbar-thumb { background-color: rgba(255, 59, 59, 0.3); border-radius: 10px; }
.contact-panel::-webkit-scrollbar-thumb:hover { background-color: rgba(255, 59, 59, 0.8); }

.contact-panel h2 {
    font-size: 1.8rem;
    color: #fff;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.contact-panel p {
    color: #b0b0b0;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    line-height: 1.5;
}

.support-form {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    width: 100%;
    max-width: 100%;
    min-width: 0; /* SAFARI FIX */
    box-sizing: border-box;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    width: 100%;
    max-width: 100%;
    min-width: 0; /* SAFARI FIX */
    box-sizing: border-box;
}

.form-group label {
    color: #ffffff;
    font-size: 0.9rem;
    font-weight: 600;
}

.form-group input[type="text"], 
.form-group input[type="email"],
.form-group select, 
.form-group textarea {
    width: 100%;
    max-width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #ffffff;
    padding: 12px 15px;
    border-radius: 8px;
    outline: none;
    font-size: 1rem;
    font-family: inherit; 
    transition: border-color 0.3s ease, background 0.3s ease;
    box-sizing: border-box; 
}

/* SAFARI FIX: Explicit appearance reset and custom dropdown arrow */
.form-group select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-color: rgba(0, 0, 0, 0.2);
    background-image: url("data:image/svg+xml;charset=US-ASCII,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20viewBox%3D%220%200%2024%2024%22%20fill%3D%22none%22%20stroke%3D%22%23ffffff%22%20stroke-width%3D%222%22%20stroke-linecap%3D%22round%22%20stroke-linejoin%3D%22round%22%3E%3Cpolyline%20points%3D%226%209%2012%2015%2018%209%22%3E%3C%2Fpolyline%3E%3C%2Fsvg%3E");
    background-repeat: no-repeat;
    background-position: right 15px center;
    background-size: 16px;
    padding-right: 40px;
}

.form-group input[type="text"]:focus, 
.form-group input[type="email"]:focus,
.form-group select:focus, 
.form-group textarea:focus {
    border-color: #ff3b3b;
    background-color: rgba(0, 0, 0, 0.4);
}

.form-group textarea {
    resize: vertical;
    min-height: 120px;
}

.form-group input[type="file"] {
    width: 100%;
    background: rgba(0, 0, 0, 0.2);
    border: 1px dashed rgba(255, 255, 255, 0.15);
    color: #b0b0b0;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-family: inherit;
    cursor: pointer;
    box-sizing: border-box;
    transition: border-color 0.3s ease, background 0.3s ease;
}

.form-group input[type="file"]:hover {
     border-color: rgba(255, 255, 255, 0.3);
     background: rgba(0, 0, 0, 0.3);
}

.form-group input[type="file"]::file-selector-button {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    margin-right: 15px;
    cursor: pointer;
    font-weight: 600;
    font-family: inherit;
    transition: background-color 0.2s ease;
}

.form-group input[type="file"]::file-selector-button:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.form-helper-text {
    font-size: 0.75rem;
    color: #888;
    margin-top: 4px;
}

.btn-submit {
    background-color: #ff3b3b;
    color: #ffffff;
    border: none;
    padding: 14px 24px;
    border-radius: 8px;
    font-size: 1.05rem;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(255, 59, 59, 0.3);
    margin-top: 0.5rem;
    width: 100%; /* Force uniform styling on mobile */
    box-sizing: border-box;
}

.btn-submit:hover {
    background-color: #ff1f1f;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 59, 59, 0.4);
}

/* --- 5. FAQ ACCORDION PANEL --- */
.faq-panel {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 3rem;
    min-width: 0; /* SAFARI FIX */
    max-width: 100%;
}

.faq-category-title {
    font-size: 1.8rem;
    color: #ffffff;
    font-weight: 800;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding-bottom: 0.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    align-items: center;
    gap: 12px;
}

.faq-category-title svg {
    color: #ff3b3b;
    width: 24px;
    height: 24px;
}

.accordion-item {
    background-color: var(--glass-bg);
    background-image: var(--glass-noise);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--glass-border);
    box-shadow: var(--glass-shadow);
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    
    transform: translateZ(0);
    -webkit-transform: translateZ(0);
    backface-visibility: hidden;
    will-change: transform, max-height, border-color;
    
    transition: border-color 0.3s ease;
}

.accordion-item:hover {
    border-color: rgba(255, 59, 59, 0.3);
}

.accordion-header {
    padding: 1.25rem 1.5rem;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    color: #ffffff;
    font-family: inherit;
    font-size: 1.1rem;
    font-weight: 600;
    line-height: 1.4;
    transition: color 0.3s ease;
}

.accordion-header:hover {
    color: #ff3b3b;
}

.accordion-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.accordion-body {
    padding: 0 1.5rem 1.5rem 1.5rem;
    color: #b0b0b0;
    line-height: 1.7;
    font-size: 1rem;
}

.accordion-body p {
    margin-bottom: 1rem;
}
.accordion-body p:last-child {
    margin-bottom: 0;
}

.accordion-body ul {
    padding-left: 1.5rem; 
    margin-bottom: 1rem;
}

.accordion-body li {
    margin-bottom: 0.5rem;
}
.accordion-body li:last-child {
    margin-bottom: 0;
}

.accordion-item.active {
    border-color: rgba(255, 59, 59, 0.5);
}
.accordion-item.active .accordion-header {
    color: #ff3b3b;
}
.accordion-item.active .accordion-icon {
    transform: rotate(180deg);
}
.accordion-item.active .accordion-icon line:nth-child(1) {
    opacity: 0;
}

/* --- 6. DYNAMIC MARGIN SCALING & MOBILE RESPONSIVENESS --- */
@media (max-width: 1200px) {
    .support-container { gap: 2.5rem; }
    .contact-panel { flex: 0 0 350px; padding: 2rem; }
}

@media (max-width: 968px) {
    .support-hero h1 { font-size: 3rem; }
    .support-container { flex-direction: column; }
    
    /* Ensure no flex bleeding occurs below breakpoints */
    .contact-panel { 
        flex: none; 
        width: 100%; 
        max-width: 100%; 
        position: static; 
        box-sizing: border-box; 
        max-height: none; 
        overflow-y: visible; 
    }
}

@media (max-width: 600px) {
    .support-hero h1 { font-size: 2.5rem; }
    .support-hero p { font-size: 1rem; }
    .faq-category-title { font-size: 1.5rem; }
    .accordion-header { font-size: 1rem; padding: 1rem; }
    .accordion-body { padding: 0 1rem 1rem 1rem; }
}

/* --- CUSTOM FILE UPLOAD UI --- */
.custom-file-upload-wrapper {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.5rem;
    flex-wrap: wrap;
    max-width: 100%;
}

.hidden-file-input {
    width: 0.1px;
    height: 0.1px;
    opacity: 0;
    overflow: hidden;
    position: absolute;
    z-index: -1;
}

.btn-custom-file {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
    padding: 0.6rem 1.2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-block;
}

@media (hover: hover) and (pointer: fine) {
    .btn-custom-file:hover {
        background: rgba(255, 255, 255, 0.15);
        border-color: rgba(255, 59, 59, 0.5);
    }
}

.file-status-text {
    color: #b0b0b0;
    font-size: 0.9rem;
}

.file-chips-container {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 10px;
}