/* Form component: shared field groups, inputs, validation messages, and form action buttons. */



/* ---------- Client Form Sections ---------- */

.clientFormSection {
    padding: 18px;
    border: 1px solid #b8c39f;
    border-radius: 14px;
    background:
        linear-gradient(180deg, #dde5cf, #d1dcc0);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.78),
        0 8px 20px rgba(0, 0, 0, 0.24);
}

    .clientFormSection + .clientFormSection {
        margin-top: 18px;
    }

.clientFormSectionHeader {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(220px, 0.85fr);
    gap: 22px;
    align-items: start;
    margin-bottom: 18px;
}

.clientFormSectionEyebrow {
    margin: 0 0 4px;
    color: #c98754;
    font-size: 0.68rem;
    font-weight: 800;
    letter-spacing: 0.10em;
    text-transform: uppercase;
}

.clientFormSectionHeader h3 {
    margin: 0;
    color: #26301f;
    font-size: 1.05rem;
    font-weight: 750;
}

.clientFormSectionDescription {
    max-width: 320px;
    margin: 0;
    justify-self: end;
    color: #586052;
    font-size: 0.80rem;
    line-height: 1.45;
    text-align: right;
}

.clientFormSection .formGroup label {
    color: #374830;
}

.clientFormGrid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 16px;
}

.clientFormFieldFull {
    grid-column: 1 / -1;
}

.clientFormSecondaryContact {
    margin-top: 20px;
    padding: 18px;
    border: 1px solid rgba(60, 82, 39, 0.18);
    border-radius: 12px;
    background:
        linear-gradient(180deg, #eef3e5, #e7edda);
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.72),
        0 4px 10px rgba(0, 0, 0, 0.10);
}

.clientFormSecondaryContactHeader {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
    margin-bottom: 16px;
}

.clientFormSecondaryContactHeader > div {
    flex-shrink: 0;
}

.clientFormSecondaryContactEyebrow {
    margin: 0 0 4px;
    color: #c98754;
    font-size: 0.7rem;
    font-weight: 800;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.clientFormSecondaryContactHeader h4 {
    margin: 0;
    color: #26301f;
    font-size: 1rem;
    font-weight: 800;
}

.clientFormSecondaryContactHeader > p {
    max-width: 390px;
    margin: 1px 0 0;
    color: #586052;
    font-size: 0.82rem;
    line-height: 1.45;
    text-align: right;
}






/* Standard label-and-field group spacing. */
.formGroup {
    display: flex;
    flex-direction: column;
    gap: 7px;
    margin: 0;
}

.formGroup label {
    color: var(--main-text);
    font-size: 0.88rem;
    font-weight: 600;
}

.formGroup input:not([type="checkbox"]),
.formGroup select,
.formGroup textarea {
    width: 100%;
    min-height: 46px;
    padding: 11px 13px;
    border: 1px solid rgba(60, 82, 39, 0.18);
    border-radius: 10px;
    outline: none;
    background:
        linear-gradient(180deg, #eef3e5, #e7edda);
    color: #262820;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.72),
        0 3px 8px rgba(0, 0, 0, 0.10);
    font: inherit;
    transition:
        border-color 180ms ease,
        background 180ms ease,
        box-shadow 180ms ease;
}


.formGroup input:not([type="checkbox"])::placeholder,
.formGroup textarea::placeholder {
    color: #718064;
}

.formGroup select option {
    background-color: #f6f1e8;
    color: #10130f;
}


.formGroup input:not([type="checkbox"]):focus,
.formGroup select:focus,
.formGroup textarea:focus {
    border-color: rgba(201, 135, 84, 0.58);
    background:
        linear-gradient(180deg, #f1f5eb, #edf0e5);
    color: #262820;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.78),
        0 0 0 3px rgba(201, 135, 84, 0.10),
        0 4px 10px rgba(0, 0, 0, 0.10);
}

#addPropertyForm .formGroup label:has(#propertyIsPrimary) {
    display: flex;
    flex-direction: row;
    align-items: center;
    gap: 10px;
    cursor: pointer;
}

#propertyIsPrimary {
    width: 18px;
    height: 18px;
    min-height: 0;
    margin: 0;
    padding: 0;
    flex: 0 0 18px;
    accent-color: #3c5227;
    cursor: pointer;
}

/* Reserved area for validation and server-response messages. */
.formMessage {
    min-height: 20px;
    margin: 4px 0 14px;
    color: var(--muted-text);
    font-size: 0.86rem;
}

/* Error-state message color. */
.formMessageError {
    color: #e9b5ab;
}

/* Success-state message color. */
.formMessageSuccess {
    color: #bdcaa9;
}

/* Right-aligned modal/form action button row. */
.formActions {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 12px;

    margin: 24px -24px -24px;
    padding: 18px 24px 24px;

    border-top: 1px solid rgba(213, 185, 137, 0.14);

    background:
        radial-gradient(circle at 88% 100%, rgba(94, 133, 64, 0.12), transparent 34%),
        linear-gradient(135deg, rgba(60, 82, 39, 0.20), transparent 58%),
        linear-gradient(180deg, rgba(21, 25, 19, 0.99), rgba(16, 19, 15, 1));

    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.025),
        0 -8px 18px rgba(0, 0, 0, 0.12);
}

/* Reusable secondary/cancel action button. */
.secondaryActionButton {
    padding: 10px 16px;
    border: 1px solid rgba(213, 185, 137, 0.18);
    border-radius: 10px;
    background-color: rgba(0, 0, 0, 0.16);
    color: var(--muted-text);
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.16s ease, color 0.16s ease, transform 0.16s ease;
}

.secondaryActionButton:hover {
    background-color: rgba(60, 82, 39, 0.24);
    color: var(--main-text);
}

.secondaryActionButton:active {
    transform: scale(0.95);
}



#addClientForm button[type="submit"] {
    min-height: 42px;
    padding: 0 20px;
    border: 1px solid rgba(213, 185, 137, 0.74);
    border-radius: 10px;
    background:
        linear-gradient(180deg, rgba(201, 135, 84, 0.98), rgba(160, 85, 91, 1));
    color: #10130f;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.22),
        0 5px 12px rgba(0, 0, 0, 0.24),
        0 0 14px rgba(201, 135, 84, 0.10);
    font-weight: 800;
    cursor: pointer;
    transition:
        transform 180ms ease,
        border-color 180ms ease,
        background 180ms ease,
        box-shadow 180ms ease;
}

#addClientForm button[type="submit"]:hover {
    transform: translateY(-1px);
    border-color: rgba(241, 181, 170, 0.92);
    background:
        linear-gradient(180deg, rgba(201, 135, 84, 1), rgba(190, 132, 79, 1));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.26),
        0 7px 16px rgba(0, 0, 0, 0.28),
        0 0 18px rgba(201, 135, 84, 0.16);
}

#addClientForm button[type="submit"]:active {
    transform: translateY(0);
}



#editClientForm button[type="submit"] {
    min-height: 42px;
    padding: 0 20px;
    border: 1px solid rgba(92, 183, 196, 0.72);
    border-radius: 10px;
    background:
        linear-gradient(180deg, rgba(46, 113, 133, 0.98), rgba(36, 80, 90, 1));
    color: #effcff;
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.14),
        0 5px 12px rgba(0, 0, 0, 0.24),
        0 0 14px rgba(65, 155, 168, 0.10);
    font-weight: 800;
    cursor: pointer;
    transition:
        transform 180ms ease,
        border-color 180ms ease,
        background 180ms ease,
        box-shadow 180ms ease;
}

#editClientForm button[type="submit"]:hover {
    transform: translateY(-1px);
    border-color: rgba(116, 218, 237, 0.92);
    background:
        linear-gradient(180deg, rgba(70, 151, 166, 1), rgba(36, 88, 106, 1));
    box-shadow:
        inset 0 1px 0 rgba(255, 255, 255, 0.17),
        0 7px 16px rgba(0, 0, 0, 0.28),
        0 0 18px rgba(73, 169, 188, 0.16);
}

#editClientForm button[type="submit"]:active {
    transform: translateY(0);
}




















@media (max-width: 700px) {
    .clientFormGrid {
        grid-template-columns: 1fr;
    }

    .clientFormFieldFull {
        grid-column: auto;
    }

    .clientFormSectionHeader {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .clientFormSectionDescription {
        width: 100%;
        max-width: none;
        justify-self: start;
        text-align: left;
    }
    
    .clientFormSecondaryContactHeader {
        display: block;
    }

    .clientFormSecondaryContactHeader > p {
        max-width: none;
        margin-top: 7px;
        text-align: left;
    }
}