/* === Fennec Freight Contact Component === */
:root {
    --bg: #053c23;
    --accent: #F1A128;
    --light: #e6eef4;
    --text: #1c2734;
    --radius: 10px;
    --shadow: 0 8px 28px rgba(5, 60, 35, 0.18);
    --white: #fff;
}
/* Default body styles are handled by app.css */

/* === Container === */
.contact-component {
    max-width: 920px;
    background: #fff;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    margin: 40px auto;
    padding: 35px 45px;
}

/* Ensure proper spacing when inside layout container */
main.container .contact-component {
    margin-top: 40px;
    margin-bottom: 40px;
}

/* Logo removed - using header logo instead */

/* === Tabs === */
.tabs {
    display: flex;
    justify-content: center;
    gap: 10px;
    margin-bottom: 25px;
    flex-wrap: wrap;
}
.tab {
    background: #fff;
    border: 1px solid var(--light);
    color: var(--bg);
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}
.tab:hover {
    background: var(--light);
}
.tab.active {
    background: var(--accent);
    border-color: var(--accent);
    color: #fff;
    box-shadow: 0 4px 14px rgba(255, 122, 0, 0.25);
}

/* === Form Visibility === */
.form {
    display: none;
    animation: fadeIn 0.35s ease forwards;
}
.form.active {
    display: block;
}
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* === Headings === */
.contact-component h2 {
    color: var(--text);
    font-size: 22px;
    margin-bottom: 8px;
}
.contact-component h3 {
    color: var(--text);
    font-size: 17px;
    font-weight: 700;
    margin-top: 28px;
    margin-bottom: 10px;
    border-bottom: 2px solid var(--accent);
    padding-bottom: 5px;
}
.form-intro {
    font-size: 14px;
    color: #5a6a78;
    margin-bottom: 18px;
}

/* === Layout & Spacing === */
.form-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
    margin-bottom: 8px;
}
.field,
.form-group {
    display: flex;
    flex-direction: column;
    flex: 1;
    margin-bottom: 18px;
}
label {
    font-weight: 600;
    font-size: 14px;
    color: var(--text);
    margin-bottom: 5px;
}
label span {
    color: #c53030;
}

/* === Form Error Messages === */
.form-error-message {
    color: #dc2626;
    font-size: 12px;
    line-height: 1.5;
    display: block;
    margin: 4px 0 0 0;
    padding: 0;
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    min-height: 18px;
    box-sizing: border-box;
}

.form-error-message--hidden {
    visibility: hidden;
    height: 0;
    min-height: 0;
    margin: 0;
}

/* Utility: prevent label text from wrapping */
.no-wrap {
    white-space: nowrap;
}

/* Repeatable Dimension rows */
.dimension-row {
    margin-bottom: 20px;
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    transition: all 0.2s ease;
}

.dimension-row:hover {
    border-color: #cbd5e1;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.05);
}

.dimension-row + .dimension-row {
    margin-top: 0;
}

.dim-controls {
    margin-top: 12px;
}
.btn-outline {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 8px 12px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
}
.btn-outline:hover {
    background: rgba(255, 122, 0, 0.06);
}
.btn-small {
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    color: #334155;
    padding: 6px 10px;
    border-radius: 6px;
    font-weight: 700;
    cursor: pointer;
}
.btn-small:hover {
    background: #e2e8f0;
}
.dim-actions {
    margin-left: auto;
    flex-shrink: 0;
}

/* === Inputs === */
input,
select,
textarea {
    border: 1px solid var(--light);
    border-radius: 8px;
    padding: 10px 12px;
    font-size: 15px;
    transition: border-color 0.25s ease, box-shadow 0.25s ease;
    background: #fff;
}
input:focus,
select:focus,
textarea:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(255, 122, 0, 0.25);
    outline: none;
}
textarea {
    /* Limit to max 3 lines */
    box-sizing: border-box;
    line-height: 1.5;
    height: calc(1.5em * 3);
    max-height: calc(1.5em * 3);
    min-height: 0;
    overflow-y: auto;
    resize: vertical;
}

/* === Commodity section (highlighted) === */
#quote h3:nth-of-type(4) {
    margin-top: 32px;
}
#quote textarea[name="commodity_description"],
#quote textarea {
    /* Quote form textareas - only different properties (height/max-height inherited from textarea) */
    font-size: 15px;
    padding: 12px 14px;
}

/* === Consent === */
.consent {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    font-size: 13px;
    color: #333;
    margin-top: 8px;
}

/* === Buttons === */
.btn {
    background: var(--accent);
    border: none;
    color: #fff;
    font-weight: 700;
    font-size: 16px;
    padding: 12px 24px;
    border-radius: 8px;
    width: 100%;
    margin-top: 14px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.btn:hover {
    background: #e46e00;
    box-shadow: 0 4px 14px rgba(255, 122, 0, 0.3);
}

/* === Extracted from inline styles === */
.quote-summary {
    margin-bottom: 6px;
    font-size: 14px;
    color: #666;
}
.dimension-inputs {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    align-content: flex-start;
}

.dim-section {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}

.dim-section-pieces {
    flex: 0 0 auto;
}

.dim-section-dimension {
    flex: 1 1 auto;
    min-width: 0;
}

.dim-divider {
    width: 1px;
    height: 40px;
    background: linear-gradient(to bottom, transparent, #cbd5e1, transparent);
    flex-shrink: 0;
    margin: 0 8px;
}

.dimension-inputs .dim-input {
    width: 90px;
    padding: 9px 11px;
}

.dim-separator {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    color: #64748b;
    font-size: 16px;
    font-weight: 500;
    flex-shrink: 0;
    padding: 0 4px;
}

.dim-multiply {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 40px;
    color: #64748b;
    font-size: 18px;
    font-weight: 500;
    flex-shrink: 0;
    padding: 0 4px;
}
.dim-field-wrapper {
    display: flex;
    flex-direction: column;
    gap: 0;
    position: relative;
    align-items: flex-start;
    flex-shrink: 0;
    justify-content: flex-start;
    min-height: 44px; /* Minimum yükseklik: input (40px) + gap (4px) */
    width: auto;
}
.dim-field-wrapper:first-child {
    min-width: 80px;
}
.dim-field-wrapper select {
    min-width: 80px;
    width: auto;
    align-self: flex-start;
    flex-shrink: 0;
}
.dim-field-wrapper input {
    width: 90px;
    align-self: flex-start;
    flex-shrink: 0;
}
/* Hata mesajları - input'ların altında, tam görünür */
.dim-field-wrapper .dim-error,
.dim-field-wrapper [data-field] {
    color: #dc2626;
    font-size: 12px;
    line-height: 1.5;
    margin: 4px 0 0 0;
    display: block;
    width: 100%;
    word-wrap: break-word;
    overflow-wrap: break-word;
    white-space: normal;
    min-height: 18px;
    box-sizing: border-box;
    flex-shrink: 0;
}
/* Hata yoksa da boş alan bırak - layout kaymasını önler */
.dim-field-wrapper .dim-error:empty,
.dim-field-wrapper [data-field]:empty {
    height: 0;
    min-height: 0;
    margin: 0;
    visibility: hidden;
}

.unit-group {
    display: flex;
    gap: 10px;
    align-items: center;
    margin-left: 8px;
    padding: 6px 12px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.unit-group:focus-within {
    border-color: var(--accent);
    box-shadow: 0 0 0 2px rgba(255, 122, 0, 0.1);
}
.volumetric-weight-display {
    display: block;
    margin-top: 12px;
    margin-bottom: 0;
    margin-left: 0;
    padding: 10px 14px;
    font-weight: 600;
    color: #F1A128;
    font-size: 13px;
    width: 100%;
    clear: both;
    background: #fff7ed;
    border: 1px solid #fed7aa;
    border-radius: 8px;
    box-sizing: border-box;
}
.unit-group .radio-option {
    font-size: 13px;
}
.radio-group {
    display: flex;
    gap: 16px;
    align-items: center;
    margin-top: 6px;
}
.radio-option {
    display: flex;
    align-items: center;
    gap: 6px;
}
.field.half-width {
    width: 50%;
}

/* === Responsive Design === */
@media (max-width: 900px) {
    .contact-component {
        padding: 30px 35px;
        margin: 30px 20px;
    }
}

@media (max-width: 768px) {
    .contact-component {
        padding: 30px 20px;
        margin: 30px 15px;
        border-radius: 8px;
    }

    .contact-page h1 {
        font-size: 22px;
        margin: 30px auto 25px;
        padding: 18px 25px;
    }

    .contact-component h2 {
        font-size: 20px;
        margin-bottom: 6px;
    }

    .contact-component h3 {
        font-size: 16px;
        margin-top: 30px;
        margin-bottom: 12px;
    }

    .form-intro {
        font-size: 13px;
        margin-bottom: 20px;
    }

    .tabs {
        gap: 8px;
        margin-bottom: 25px;
    }

    .tab {
        padding: 10px 16px;
        font-size: 14px;
        flex: 1;
        min-width: 0;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
        margin-bottom: 0;
    }

    .field,
    .form-group {
        margin-bottom: 20px;
        width: 100%;
    }

    .field.half-width {
        width: 100%;
    }

    label {
        font-size: 13px;
        margin-bottom: 5px;
    }

    input,
    select,
    textarea {
        padding: 11px 12px;
        font-size: 14px;
    }

    /* Dimension inputs - mobile optimized */
    .dimension-row {
        padding: 14px;
        margin-bottom: 16px;
    }

    .dimension-inputs {
        gap: 12px;
        flex-wrap: wrap;
    }

    .dim-section {
        gap: 6px;
        width: 100%;
    }

    .dim-section-pieces {
        width: 100%;
        margin-bottom: 8px;
        padding-bottom: 12px;
        border-bottom: 1px solid #e2e8f0;
    }

    .dim-divider {
        display: none;
    }

    .dim-section-dimension {
        width: 100%;
    }

    .dimension-inputs .dim-input {
        width: 75px;
        padding: 8px 10px;
        font-size: 14px;
    }

    .dim-field-wrapper {
        min-width: 75px;
        min-height: 44px;
    }

    .dim-section-pieces .dim-field-wrapper:first-child {
        min-width: 80px;
    }

    .dim-section-pieces .dim-field-wrapper select {
        min-width: 80px;
        padding: 8px 10px;
        font-size: 14px;
    }

    .dim-section-pieces .dim-field-wrapper input {
        width: 100px;
        padding: 8px 10px;
        font-size: 14px;
    }

    .dim-separator,
    .dim-multiply {
        font-size: 14px;
        height: 36px;
        padding: 0 2px;
    }

    .unit-group {
        margin-left: 0;
        margin-top: 8px;
        width: 100%;
        justify-content: flex-start;
    }

    .unit-group {
        gap: 10px;
        margin-left: 4px;
    }

    .unit-group .radio-option {
        font-size: 12px;
    }

    .radio-group {
        gap: 12px;
        flex-wrap: wrap;
    }

    .radio-option {
        font-size: 13px;
    }

    .dim-controls {
        margin-top: 8px;
    }

    .btn-outline {
        padding: 8px 16px;
        font-size: 13px;
    }

    .btn {
        padding: 12px 20px;
        font-size: 15px;
        margin-top: 15px;
    }

    .consent {
        font-size: 12px;
        margin-top: 8px;
    }
}

@media (max-width: 480px) {
    .contact-component {
        padding: 25px 15px;
        margin: 20px 10px;
    }

    .contact-page h1 {
        font-size: 20px;
        margin: 25px auto 20px;
        padding: 16px 20px;
    }

    .contact-component h2 {
        font-size: 18px;
    }

    .contact-component h3 {
        font-size: 15px;
        margin-top: 25px;
        margin-bottom: 10px;
    }

    .tabs {
        flex-direction: column;
        gap: 6px;
    }

    .tab {
        width: 100%;
        padding: 12px;
        text-align: center;
        font-size: 13px;
    }

    .form-intro {
        font-size: 12px;
        margin-bottom: 18px;
    }

    .field,
    .form-group {
        margin-bottom: 18px;
    }

    label {
        font-size: 12px;
    }

    input,
    select,
    textarea {
        padding: 10px 12px;
        font-size: 14px;
    }

    /* Compact dimension inputs for very small screens */
    .dimension-row {
        padding: 12px;
        margin-bottom: 14px;
    }

    .dimension-inputs {
        gap: 10px;
    }

    .dim-section {
        gap: 5px;
    }

    .dimension-inputs .dim-input {
        width: 65px;
        padding: 8px 8px;
        font-size: 13px;
    }

    .dim-field-wrapper {
        min-width: 65px;
        min-height: 44px;
    }

    .dim-section-pieces .dim-field-wrapper:first-child {
        min-width: 70px;
    }

    .dim-section-pieces .dim-field-wrapper select {
        min-width: 70px;
        padding: 8px 8px;
        font-size: 13px;
    }

    .dim-section-pieces .dim-field-wrapper input {
        width: 90px;
        padding: 8px 8px;
        font-size: 13px;
    }

    .dim-separator,
    .dim-multiply {
        font-size: 13px;
        height: 34px;
        padding: 0 1px;
    }

    .unit-group {
        gap: 8px;
        margin-left: 2px;
        flex-wrap: wrap;
    }

    .unit-group .radio-option {
        font-size: 11px;
    }

    .dim-field-wrapper .dim-error,
    .dim-field-wrapper [data-field] {
        font-size: 11px;
        width: 100%;
    }

    .volumetric-weight-display {
        font-size: 12px;
        margin-top: 6px;
    }

    .form-error-message {
        font-size: 11px;
    }

    .btn {
        padding: 11px 18px;
        font-size: 14px;
    }

    .consent {
        font-size: 11px;
        line-height: 1.5;
    }
}

/* Landscape orientation adjustments for mobile */
@media (max-width: 768px) and (orientation: landscape) {
    .contact-component {
        padding: 25px 20px;
        margin: 20px 15px;
    }

    .dimension-row {
        padding: 14px;
    }

    .dimension-inputs {
        gap: 14px;
    }

    .dim-section-pieces {
        width: auto;
        margin-bottom: 0;
        padding-bottom: 0;
        border-bottom: none;
    }

    .dim-divider {
        display: block;
        height: 36px;
    }

    .dimension-inputs .dim-input {
        width: 80px;
    }

    .dim-section-pieces .dim-field-wrapper select {
        min-width: 90px;
    }

    .dim-section-pieces .dim-field-wrapper input {
        width: 110px;
    }
}

/* ========================================
   Hero Banner Section
   ======================================== */
.contact-hero {
    width: 100vw;
    position: relative;
    left: 50%;
    right: 50%;
    margin-left: -50vw;
    margin-right: -50vw;
    height: 400px;
    background-image: url("/assets/images/contactusBanner.webp");
    background-size: cover;
    background-position: center;
    background-attachment: fixed;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--white);
    overflow: hidden;
}

.contact-hero-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.55);
    z-index: 1;
}

.contact-hero-content {
    position: relative;
    z-index: 2;
    text-align: center;
    padding: 20px;
    max-width: 900px;
    animation: fadeInUp 1s ease;
}

.contact-hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    margin: 0 0 20px;
    text-shadow: 2px 2px 8px rgba(0, 0, 0, 0.3);
    letter-spacing: -0.5px;
    font-family: "Aptos", sans-serif;
}

.contact-hero-subtitle {
    font-size: 1.3rem;
    font-weight: 400;
    margin: 0;
    opacity: 0.95;
    line-height: 1.6;
    font-family: "Aptos", sans-serif;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 768px) {
    .contact-hero {
        height: 300px;
        background-attachment: scroll;
    }

    .contact-hero-title {
        font-size: 2.5rem !important;
    }

    .contact-hero-subtitle {
        font-size: 1.1rem;
    }
}

@media (max-width: 480px) {
    .contact-hero-title {
        font-size: 2rem !important;
    }

    .contact-hero-subtitle {
        font-size: 1rem;
    }
}
