/* --- Global Reset & Typography --- */
* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    /* Uses the device's native font for a clean, app-like feel */
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #f4f5f7; /* Very light grey background */
    color: #111;
    display: flex;
    justify-content: center;
    padding: 1.25rem; /* 20px */
    min-height: 100vh;
}

/* --- Form Layout & Card --- */
.form-container {
    width: 100%;
    max-width: 27.5rem; /* 440px - Limits width on desktop */
    margin-top: 4vh; /* Pushes it slightly down from the absolute top */
}

.form-card {
    container-type: inline-size;
    background-color: #ffffff;
    border-radius: 2rem; /* 16px */
    padding: 2rem 1.5rem; /* 32px 24px */
    box-shadow: 0 0.5rem 1.875rem rgba(0, 0, 0, 0.04); /* 0 8px 30px */
    border: .25rem solid #e1e1e1
}

h1 {
    text-align: center;
    white-space: nowrap;
    font-size: clamp(1.2rem, 8cqi, 1.8rem);
    margin-top:-1rem;
}

hr {
    margin-left: -1.5rem; /* -24px */
    margin-right:-1.5rem; /* -24px */
    margin-top: 1rem;
    margin-bottom: 2rem;
    border: none;
    border-top: .25rem solid #e1e1e1;
}

h2 {
    font-size: 1.4rem;
    font-weight: 600;
    margin-bottom: 1rem; /* 24px */
    text-align: center;
    letter-spacing: -0.5px; /* Kept px for crisp typography kerning */
}
.pad {
    padding-bottom: 1rem;
    padding-top: 1rem;
}

.outline{
 padding:1rem;
 border-radius: 2.2rem;
 border: .15rem solid #e1e1e1;
}

.form-group {
    margin-bottom: 1rem; /* 16px */
    width: 100%;
}

/* --- Inputs, Textareas, and Native Selects --- */
select, 
.select-selected {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid #e1e1e1; 
    border-radius:1rem;
    font-size: 1rem;
    font-family: inherit; /* FIX 1: Forces native elements to use your clean system font */
    background-color: #fafafa;
    color: #333;
    transition: border-color 0.2s, background-color 0.2s;
    cursor: pointer;
}

textarea {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 1px solid #e1e1e1; 
    border-radius: 1rem;
    font-size: 1rem;
    font-family: inherit; /* FIX 1: Forces native elements to use your clean system font */
    background-color: #fafafa;
    color: #333;
    transition: border-color 0.2s, background-color 0.2s;
    cursor: pointer;
}

/* FIX 2: Separate the height logic so we don't break the native select */

/* Native select just gets a hard height, NO flexbox */
select {
    height: 3.5rem; 
}

/* Custom select gets the height AND flexbox to align the image/text */
.select-selected {
    height: 3.5rem;
    display: flex;
    align-items: center; 
}

/* Force the dropdowns to be exactly the same height */
select, 
.select-selected {
    min-height: 3.5rem; /* ~56px: A perfect, touch-friendly height */
    display: flex;      /* Ensures inner content stays vertically centered */
    align-items: center; 
}

/* Hover & Focus states for standard inputs */
select:hover, textarea:hover, .select-selected:hover {
    background-color: #f2f2f2;
}

select:focus, textarea:focus {
    outline: none;
    border-color: #111;
    background-color: #fff;
}

textarea {
    resize: vertical;
    font-family: inherit;
    line-height: 1.5;
}

/* PRO-TRICK: Strip default native select styling and replace it with 
  a custom chevron so it matches the custom UI exactly. 
*/
select {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg fill="none" stroke="%23333" stroke-width="2" viewBox="0 0 24 24" xmlns="http://www.w3.org/2000/svg"><path stroke-linecap="round" stroke-linejoin="round" d="M19 9l-7 7-7-7"></path></svg>');
    background-repeat: no-repeat;
    background-position: right 1rem center; /* right 16px center */
    background-size: 1rem; /* 16px */
    padding-right: 2.5rem; /* 40px - Make room for the arrow */
}

/* --- Custom UI Dropdown Fixes --- */
.custom-select {
    position: relative;
}

.select-selected {
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
}

/* This class fixes the flexbox issue on the trigger */
.trigger-content {
    display: flex;
    align-items: center;
    gap: 0.75rem; /* 12px */
}

/* Shrink the arrow to match the native select trick above */
.arrow {
    font-size: 0.75rem;  /* 12px */
    color: #333;
}

.select-items {
    position: absolute;
    background-color: #ffffff;
    top: calc(100% + 0.375rem); /* Drops it slightly below the input (6px) */
    left: 0;
    right: 0;
    z-index: 99;
    border: 1px solid #e1e1e1; /* Kept px */
    border-radius: 0.625rem; /* 10px */
    box-shadow: 0 0.625rem 1.5625rem rgba(0,0,0,0.08); /* 0 10px 25px */
    overflow: hidden;
}

.select-hide {
    display: none;
}

.select-items div {
    padding: 0.75rem 1rem; /* 12px 16px */
    display: flex;
    flex-direction: row; /* Forces horizontal layout */
    align-items: center; /* Perfectly centers vertically */
    gap: 0.75rem; /* 12px - Space between image and text */
    font-size: 1rem; /* 16px */
    color: #333;
    transition: background-color 0.15s;
}

.select-items div:hover {
    background-color: #f5f5f5;
}

.brand-icon {
    width: 1.5rem; /* 24px */
    height: 1.5rem; /* 24px */
    object-fit: contain;
    flex-shrink: 0; /* Prevents the image from being squished */
    display: block;
}

/* --- Submit Button --- */
.submit-btn {
    width: 100%;
    color: black;
    background-color: white;
    border: .15rem solid #e1e1e1;
    border-radius: 1rem; /* 10px */
    padding: 1rem; /* 16px */
    font-size: 1rem; /* 16px */
    font-weight: 600;
    margin-top: 0.5rem; /* 8px */
    cursor: pointer;
    transition: transform 0.1s, background-color 0.2s;
}

.submit-btn:hover {
    background-color: #e1e1e1;
}

.submit-btn:active {
    transform: scale(0.98); /* Slight click effect */
}

.file-hidden {
    display: none; /* Hides the ugly default browser button */
}

.file-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.625rem; /* 10px */
    padding: 1rem; /* 16px */
    border: 2px dashed #e1e1e1; /* Kept px for crisp border rendering */
    border-radius: 1rem; /* 10px */
    background-color: #fafafa;
    color: #666;
    cursor: pointer;
    transition: border-color 0.2s, background-color 0.2s, color 0.2s;
    font-size: 1rem; /* 16px */
    width: 100%;
    box-sizing: border-box;
    margin-bottom: -1rem;
}

.file-upload-label:hover {
    border-color: #111;
    background-color: #f2f2f2;
    color: #111;
}

/* When a file is selected, we will add this class via JS to make it look "active" */
.file-upload-label.active {
    border-color: #111;
    border-style: solid;
    background-color: #fff;
    color: #111;
    font-weight: 600;
}

.chevron {
    width: 1rem; /* 16px */
    height: 1rem; /* 16px */
    flex-shrink: 0; /* Prevents the icon from shrinking if the text gets long */
}