/* ==========================
   FORMS — shared styles
   Used by: application.html, /direct-apply, /business-debt-schedule,
   /upload-documents, /upload-stips, /company/contact, /funding/check-eligibility
   ========================== */

/* GRID */
.application-grid {
    max-width: 700px;
    margin: 0 auto;
    padding: 16px;
}

/* ROWS */
.application-row {
    display: grid;
    gap: 8px;
    margin-bottom: 15px;
}

.application-row > * {
    min-width: 0;
}

/* ROW PRESETS */
.row-100         { grid-template-columns: 1fr; }
.row-50-50       { grid-template-columns: 1fr 1fr; }
.row-40-60       { grid-template-columns: 2fr 3fr; }
.row-60-40       { grid-template-columns: 3fr 2fr; }
.row-30-70       { grid-template-columns: 3fr 7fr; }
.row-70-30       { grid-template-columns: 7fr 3fr; }
.row-33-33-33    { grid-template-columns: 1fr 1fr 1fr; }
.row-45-35-20    { grid-template-columns: 4.5fr 3.5fr 2fr; }
.row-35-45-20    { grid-template-columns: 3.5fr 4.5fr 2fr; }
.row-25-25-25-25 { grid-template-columns: 5fr 5fr 5fr 5fr; }
.row-25-25-25-20 { grid-template-columns: 5fr 5fr 5fr 3.5fr; }

/* LABELS — sit tight above the input */
.application-row label {
    font-family: 'Vectora Roman';
    font-size: 15px;
    color: #000;
    margin: 0;
    line-height: 1.2;
}

/* When a row contains only labels (label-row pattern) tighten the gap to the
   following input row */
.application-row.label-row {
    margin-bottom: 5px;
}

/* INPUT STYLE */
.application-row input,
.application-row select {
    flex: 1;
    box-sizing: border-box;
    padding: 13px 15px;
    border: 1px solid #e0e6ee;
    border-radius: 6px;
    font-family: 'Vectora Roman';
    font-size: 17px;
    line-height: 1.1;
    background-color: #ffffff;
    color: #000;
}

.application-row input::placeholder {
    color: #718096;
    font-size: 17px;
    line-height: 1.1;
    font-family: 'Vectora Roman';
}

.application-row input:focus,
.application-row select:focus,
.application-row .dd-trigger:focus,
.application-row .dd-trigger:focus-visible,
.application-consent input:focus {
    outline: none;
    border-color: #6ab235;
    box-shadow: 0 0 0 2px rgba(106, 178, 53, 0.18);
}

.application-row input.error,
.application-row select.error {
    border-color: #cc4b37;
}

/* CONSENT */
.application-consent {
    display: flex;
    align-items: flex-start;
    gap: 11.5px;
    font-size: 11.5px;
    color: #000;
    margin: 25px 10px 16px 10px;
    font-family: 'Vectora Light';
    line-height: 1.2;
    text-align: justify;
}

.application-consent a {
    color: #6ab235;
    font-family: 'Vectora Roman';
    font-weight: 900;
    -webkit-text-stroke: 0.2px;
    text-decoration: underline;
}

.application-consent input {
    appearance: none;
    -webkit-appearance: none;
    width: 20px;
    height: 20px;
    border: 1px solid #e0e6ee;
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
    flex-shrink: 0;
    margin-bottom: 3px;
}

.application-consent input[type="checkbox"]:checked {
    background: #6ab235;
    border-color: #6ab235;
}

/* SUBMIT BUTTON — pill, centered */
.application-btn {
    display: block;
    font-family: 'Vectora Roman';
    border-radius: 28px;
    padding: 16px 42px;
    font-size: 17px;
    font-weight: 700;
    -webkit-text-stroke: 0.3px;
    margin: 20px auto 0;
    background: #7BE42F;
    color: #000;
    border: none;
    cursor: pointer;
}

.application-btn:hover {
    filter: brightness(0.95);
}

/* GO BACK LINK */
.go-back-button {
    font-family: 'Vectora Roman';
    text-align: left;
    font-size: 15px;
    font-weight: 700;
    -webkit-text-stroke: 0.4px;
    color: #6ab235;
    padding: 30px 0;
    cursor: pointer;
}

/* ==========================
   CUSTOM DROPDOWN
   Drop-in replacement for <select>. Markup:

     <div class="custom-dropdown" data-name="my-field">
       <div class="dd-trigger placeholder" tabindex="0">
         <span class="dd-value">Select an option</span>
       </div>
       <div class="dd-panel">
         <div class="dd-option" data-value="a">Option A</div>
         <div class="dd-option" data-value="b">Option B</div>
       </div>
       <input type="hidden" name="my-field">
     </div>

   forms.js handles the open/close + selection wiring.
   ========================== */

.application-row .custom-dropdown {
    position: relative;
    min-width: 0;
}

.application-row .dd-trigger {
    box-sizing: border-box;
    padding: 13px 32px 13px 15px;
    border: 1px solid #e0e6ee;
    border-radius: 6px;
    font-family: 'Vectora Roman';
    font-size: 17px;
    line-height: 1.1;
    background-color: #fff;
    color: #000;
    cursor: pointer;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'><path fill='none' stroke='%236ab235' stroke-width='2' d='M1 1.5l5 5 5-5'/></svg>");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 10px 7px;
    display: flex;
    align-items: center;
    min-height: 47px;
}

.application-row .dd-trigger.placeholder {
    color: #718096;
    font-family: 'Vectora Light';
}

.application-row .dd-trigger.error {
    border-color: #cc4b37;
}

.application-row .dd-trigger.open {
    border-color: #6ab235;
}

.application-row .dd-panel {
    display: none;
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    z-index: 100;
    background: #fff;
    border: 1px solid #e0e6ee;
    border-radius: 6px;
    max-height: 260px;
    overflow-y: auto;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.08);
}

.application-row .dd-panel.open {
    display: block;
}

.application-row .dd-option {
    padding: 11px 15px;
    font-family: 'Vectora Roman';
    font-size: 17px;
    color: #000;
    cursor: pointer;
}

.application-row .dd-option:hover {
    background: #eef2f7;
}

.application-row .dd-option.selected {
    background: #eaf5e0;
    color: #6ab235;
    font-weight: 700;
}

/* PERCENT INPUT — symbol sits on the right (e.g. "50%") */
.percent-input-wrap {
    position: relative;
    min-width: 0;
}

.percent-input-wrap .percent-sign {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    font-family: 'Vectora Light';
    font-size: 17px;
    color: #718096;
    pointer-events: none;
    z-index: 1;
}

.percent-input-wrap input {
    padding-right: 28px !important;
    width: 100%;
}

/* MOBILE */
@media (max-width: 600px) {
    .application-row {
        grid-template-columns: 1fr;
    }
}
