﻿.gw-form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px 12px;
}

.gw-field-label {
    display: block;
    font-size: 12px;
    font-weight: 700;
    margin-bottom: 6px;
}

.gw-select {
    width: 100%;
    height: 34px;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.20);
    box-sizing: border-box;
}

.gw-btn:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(47,111,235,0.18);
}

.gw-btn-archive:hover {
    filter: brightness(0.95);
}

.gw-btn-save:hover {
    background: rgba(200,16,46,0.06);
}

.gw-btn-cancel:hover {
    background: rgba(0,0,0,0.04);
}

.gw-input {
    width: 100%;
    height: 34px;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.20);
    box-sizing: border-box;
}

    .gw-input[readonly] {
        background: #f5f5f5;
        color: rgba(0,0,0,0.75);
    }

.gw-btn {
    border-radius: 4px;
    padding: 10px 14px;
    font-weight: 500;
    letter-spacing: 0.01em;
    cursor: pointer;
    border: 2px solid transparent;
    background: transparent;
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    line-height: 1;
}

.gw-btn-archive {
    background: #c8102e;
    border-color: #c8102e;
    color: #fff;
}

.gw-btn-save {
    background: #fff;
    border-color: #c8102e;
    color: #111;
}

.gw-btn-cancel {
    background: #fff;
    border-color: rgba(0,0,0,0.35);
    color: rgba(0,0,0,0.60);
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 12px;
}

.form-field span {
    display: block;
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 4px;
}

.form-field input,
.form-field select {
    width: 100%;
    height: 34px;
    padding: 6px 10px;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.18);
    outline: none;
}

.btn-primary {
    background: #2563eb;
    color: #fff;
}

.btn-secondary {
    background: #e5e7eb;
    color: #111;
}

/* Recipient chips */
.gw-recips {
    width: 100%;
    min-height: 34px;
    border-radius: 10px;
    border: 1px solid rgba(0,0,0,0.18);
    padding: 6px 10px;
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    color: #111;
}

.gw-recips-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    flex: 1 1 auto;
    min-width: 0;
}

.gw-chip {
    position: relative;
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 6px 26px 6px 12px;
    border-radius: 999px;
    border: 1px solid rgba(0,0,0,0.20);
    background: rgba(0,0,0,0.03);
    font-size: 13px;
    line-height: 1.2;
    color: #111;
    white-space: nowrap;
}

.gw-chip-text {
    color: #111 !important;
    font-weight: 500;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    max-width: 520px;
    display: block;
}

.gw-chip-x {
    position: absolute;
    top: 2px;
    right: 6px;
    width: auto !important;
    min-width: 0 !important;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    border: 0;
    background: transparent;
    cursor: pointer;
    color: #111;
    font-size: 14px;
    line-height: 1;
    padding: 2px;
    opacity: 0.75;
}

    .gw-chip-x:hover {
        opacity: 1;
    }

.gw-recips-add {
    width: 30px;
    height: 30px;
    border-radius: 10px;
    border: 2px solid rgba(0,0,0,0.35);
    background: #fff;
    color: #6b6b6b;
    font-weight: 900;
    cursor: pointer;
    line-height: 1;
    flex: 0 0 auto;
}

    .gw-recips-add:hover {
        background: rgba(0,0,0,0.02);
    }

/* =========================================================
   Tenant summary / insurance display blocks
   ========================================================= */

.tenant-summary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px 16px;
    font-size: 14px;
}

.tenant-summary-item--wide {
    grid-column: 1 / -1;
}

.tenant-summary-item .label {
    display: block;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    opacity: 0.7;
    margin-bottom: 2px;
}

.tenant-summary-item .value {
    font-size: 14px;
    font-weight: 500;
}

.insurance-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 10px 20px;
    margin-top: 4px;
}

.insurance-wide {
    grid-column: 1 / -1;
}

/* ==========================================================
   Field Validation
========================================================== */

.gw-field.is-required-error .gw-input,
.gw-field.is-required-error .gw-select {
    border-color: #d93025 !important;
    box-shadow: 0 0 0 1px #d93025 !important;
}

.gw-field.is-required-error .gw-field-label {
    color: #d93025;
}

.gw-field-required {
    color: #d93025;
    font-weight: 700;
}