/* ========================================
   FORM SHELL
======================================== */

.form-shell {
    gap: 1.75rem;
    padding: clamp(1.25rem, 1.8vw, 1.75rem);
    border-radius: 1rem;
    display: flex;
    flex-direction: column;
    background: #ffffff;
    border: 1px solid rgba(17, 17, 17, 0.08);
    box-shadow: 0 20px 60px rgba(17, 17, 17, 0.08);
}

/* ========================================
   FORM SECTIONS
======================================== */

.form-section {
    gap: 1.15rem;
    padding-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
    border-bottom: 1px solid rgba(17, 17, 17, 0.08);
}

.form-section:last-child {
    padding-bottom: 0;
    border-bottom: 0;
}

.form-section--final {
    gap: 1.25rem;
}

.form-section__header {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-section__title {
    margin: 0;
    font-family: "Poppins", sans-serif;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.3;
    color: #111111;
}

.form-section__text {
    margin: 0;
    font-size: 0.98rem;
    line-height: 1.7;
    color: #5f5f5f;
}

/* ========================================
   FORM GRID
======================================== */

.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1.25rem;
}

.form-grid--2 {
    grid-template-columns: 1fr;
}

@media (min-width: 768px) {
    .form-grid--2 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* ========================================
   FORM GROUPS
======================================== */

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.55rem;
    min-width: 0;
}

.form-label {
    display: inline-flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 0.35rem;
    margin: 0;
    font-size: 0.9rem;
    font-weight: 600;
    line-height: 1.4;
    color: #222222;
}

.required-mark {
    color: #B87A2F;
    font-weight: 700;
}

/* ========================================
   FORM CONTROLS
======================================== */

.form-control,
.form-select,
.form-textarea {
    width: 100%;
    min-width: 0;
    appearance: none;
    border: 1px solid rgba(17, 17, 17, 0.14);
    border-radius: 0.9rem;
    background-color: #ffffff;
    color: #222222;
    font: inherit;
    line-height: 1.5;
    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        background-color 0.25s ease,
        color 0.25s ease,
        transform 0.25s ease;
}

.form-control,
.form-select {
    min-height: 2.95rem;
    padding: 0.7rem 0.9rem;
}

.form-textarea {
    min-height: 7rem;
    padding: 0.85rem 0.9rem;
    resize: vertical;
}

.form-control::placeholder,
.form-textarea::placeholder {
    color: #8b8b8b;
}

.form-control:hover,
.form-select:hover,
.form-textarea:hover {
    border-color: rgba(17, 17, 17, 0.22);
}

.form-control:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #D69A3B;
    box-shadow: 0 0 0 4px rgba(214, 154, 59, 0.16);
}

.form-control:disabled,
.form-select:disabled,
.form-textarea:disabled {
    cursor: not-allowed;
    background-color: #f3f3f3;
    color: #7b7b7b;
    opacity: 1;
}

/* ========================================
   SELECT CONTROL
======================================== */

.form-select {
    padding-right: 3rem;
    background-image: linear-gradient(45deg, transparent 50%, #444444 50%),
                      linear-gradient(135deg, #444444 50%, transparent 50%);
    background-position: calc(100% - 1.25rem) calc(50% - 0.15rem),
                         calc(100% - 0.95rem) calc(50% - 0.15rem);
    background-size: 0.45rem 0.45rem, 0.45rem 0.45rem;
    background-repeat: no-repeat;
}

.form-select:focus {
    background-image: linear-gradient(45deg, transparent 50%, #D69A3B 50%),
                      linear-gradient(135deg, #D69A3B 50%, transparent 50%);
}

/* ========================================
   CHECKBOX / CONSENT
======================================== */

.form-check {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
}

.form-check-input {
    flex: 0 0 auto;
    width: 1.1rem;
    height: 1.1rem;
    margin-top: 0.2rem;
    accent-color: #D69A3B;
    cursor: pointer;
}

.form-check-label {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.7;
    color: #3f3f3f;
    cursor: pointer;
}

/* ========================================
   FORM ACTIONS
======================================== */

.form-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.85rem;
}

.form-note {
    margin: 0;
    font-size: 0.92rem;
    line-height: 1.7;
    color: #666666;
}

/* ========================================
   HELP / FEEDBACK TEXT
======================================== */

.form-help,
.form-error,
.form-success {
    margin: 0;
    font-size: 0.88rem;
    line-height: 1.6;
}

.form-help {
    color: #6a6a6a;
}

.form-error {
    color: #b42318;
}

.form-success {
    color: #027a48;
}

/* ========================================
   VALIDATION STATES
======================================== */

.form-control.is-invalid,
.form-select.is-invalid,
.form-textarea.is-invalid {
    border-color: #d92d20;
    box-shadow: 0 0 0 4px rgba(217, 45, 32, 0.12);
}

.form-control.is-valid,
.form-select.is-valid,
.form-textarea.is-valid {
    border-color: #12b76a;
    box-shadow: 0 0 0 4px rgba(18, 183, 106, 0.12);
}

/* ========================================
   REDUCED MOTION
======================================== */

@media (prefers-reduced-motion: reduce) {
    .form-control,
    .form-select,
    .form-textarea {
        transition: none;
    }
}