/* ============================================================
   24Rent Referral Form — form.css
   Scoped under .rent24-referral to avoid conflicts with the theme
   ============================================================ */

.rent24-referral {
    --r24-orange: #f5a623;
    --r24-orange-dk: #e09510;
    --r24-orange-lt: #fff8ed;
    --r24-orange-br: #fde9b8;
    --r24-text: #1a1a1a;
    --r24-text2: #444444;
    --r24-muted: #888888;
    --r24-border: #e0e0e0;
    --r24-bg: #f4f4f4;
    --r24-white: #ffffff;
    --r24-error: #d9534f;
    --r24-success: #4cae4c;
    --r24-radius: 6px;

    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    color: var(--r24-text);
    max-width: 560px;
    margin: 28px auto 48px;
    box-sizing: border-box;
    padding: 0 16px;
}

.rent24-referral *,
.rent24-referral *::before,
.rent24-referral *::after {
    box-sizing: border-box;
}

/* ── Referral banner ── */
.r24-banner {
    background: var(--r24-orange-lt);
    border: 1.5px solid var(--r24-orange-br);
    border-radius: var(--r24-radius);
    padding: 18px 20px;
    margin-bottom: 16px;
    display: flex;
    gap: 14px;
    align-items: flex-start;
}

.r24-banner__icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    background: var(--r24-orange);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.r24-banner__icon svg {
    width: 20px;
    height: 20px;
    color: #fff;
}

.r24-banner__title {
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 4px;
}

.r24-banner__desc {
    font-size: 13px;
    color: var(--r24-text2);
    line-height: 1.55;
}

/* ── Pills ── */
.r24-pills {
    display: flex;
    gap: 8px;
    margin-top: 10px;
    flex-wrap: wrap;
}

.r24-pill {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: var(--r24-orange);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 99px;
    padding: 4px 12px;
    white-space: nowrap;
}

.r24-pill svg {
    width: 11px;
    height: 11px;
    flex-shrink: 0;
}

.r24-pill--lg {
    font-size: 13px;
    padding: 6px 16px;
}

.r24-pill--plain {
    background: transparent !important;
    color: #1a1a1a !important;
    font-weight: 600;
    padding: 4px 0;
}

.r24-pill--plain svg {
    width: 16px;
    height: 16px;
}

/* ── Referral code chip ── */
.r24-ref-chip {
    display: flex;
    align-items: center;
    gap: 7px;
    background: #f0faf0;
    border: 1px solid #c3e6c3;
    border-radius: var(--r24-radius);
    padding: 8px 12px;
    font-size: 12.5px;
    color: #2d6a2d;
    margin-bottom: 14px;
}

.r24-ref-chip svg {
    width: 14px;
    height: 14px;
    color: var(--r24-success);
    flex-shrink: 0;
}

/* ── Server message banner (errors / already-customer) ── */
.r24-msg {
    border-radius: var(--r24-radius);
    padding: 13px 16px;
    margin-bottom: 18px;
    font-size: 13.5px;
    line-height: 1.55;
}

.r24-msg--error {
    background: #fdf2f2;
    border: 1px solid #f5c6cb;
    color: #a02020;
}

.r24-msg--warning {
    background: #fff8ed;
    border: 1px solid var(--r24-orange-br);
    color: #7a4a00;
}

.r24-msg__title {
    font-weight: 700;
    margin-bottom: 3px;
}

/* ── Card ── */
.r24-card {
    background: var(--r24-white);
    border: 1px solid var(--r24-border);
    border-radius: var(--r24-radius);
    overflow: hidden;
    box-shadow: 0 1px 6px rgba(0, 0, 0, 0.08);
}

.r24-card__head {
    padding: 20px 24px 16px;
    border-bottom: 1px solid var(--r24-border);
}

.r24-card__title {
    font-size: 17px !important;
    font-weight: 700 !important;
    margin: 0 0 3px !important;
    padding: 0 !important;
    color: var(--r24-text) !important;
    border: none !important;
}

.r24-card__desc {
    font-size: 13px;
    color: var(--r24-muted);
    margin: 0;
}

.r24-card__body {
    padding: 22px 24px 20px;
}

/* ── Form layout ── */
.r24-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 14px;
    margin-bottom: 16px;
}

@media (max-width: 420px) {
    .r24-row {
        grid-template-columns: 1fr;
    }
}

.r24-field {
    display: flex;
    flex-direction: column;
    gap: 5px;
    margin-bottom: 16px;
}

.r24-row .r24-field {
    margin-bottom: 0;
}

.r24-field:last-of-type {
    margin-bottom: 0;
}

/* ── Label ── */
.r24-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--r24-text2);
    display: block;
}

.r24-req {
    color: var(--r24-orange);
    margin-left: 1px;
}

/* ── Input ── */
.r24-input-wrap {
    position: relative;
}

.r24-ico {
    position: absolute;
    left: 11px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    color: #cccccc;
    pointer-events: none;
    transition: color 0.15s;
}

.r24-input-wrap:focus-within .r24-ico {
    color: var(--r24-orange);
}

.r24-input {
    width: 100% !important;
    border: 1.5px solid var(--r24-border) !important;
    border-radius: var(--r24-radius) !important;
    background: var(--r24-white) !important;
    color: var(--r24-text) !important;
    font-size: 14px !important;
    padding: 10px 34px 10px 34px !important;
    outline: none !important;
    transition: border-color 0.15s, box-shadow 0.15s !important;
    -webkit-appearance: none;
    box-shadow: none !important;
    line-height: normal !important;
    height: auto !important;
}

.r24-input::placeholder {
    color: #bbbbbb;
}

.r24-input:focus {
    border-color: var(--r24-orange) !important;
    box-shadow: 0 0 0 3px rgba(245, 166, 35, 0.14) !important;
}

.r24-input.r24-valid {
    border-color: var(--r24-success) !important;
}

.r24-input.r24-invalid {
    border-color: var(--r24-error) !important;
}

/* Status icon inside input (right side) */
.r24-status-ico {
    position: absolute;
    right: 11px;
    top: 50%;
    transform: translateY(-50%);
    width: 15px;
    height: 15px;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s;
}

.r24-status-ico.r24-show {
    opacity: 1;
}

/* Hint / error message below field */
.r24-hint {
    font-size: 11.5px;
    color: var(--r24-error);
    min-height: 0;
    display: none;
    padding-left: 1px;
}

.r24-hint.r24-show {
    display: block;
}

/* ── Terms checkbox ── */
.r24-field--terms {
    margin-top: 18px;
    margin-bottom: 0;
}

.r24-terms-label {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    cursor: pointer;
    font-size: 13px;
    color: var(--r24-text2);
    line-height: 1.55;
}

.r24-terms-input {
    flex-shrink: 0;
    margin-top: 2px;
    width: 16px !important;
    height: 16px !important;
    accent-color: var(--r24-orange);
    cursor: pointer;
}

.r24-terms-label a {
    color: var(--r24-orange);
    text-decoration: none;
}

.r24-terms-label a:hover {
    text-decoration: underline;
}

.r24-field--terms .r24-hint {
    margin-left: 26px;
}

/* ── Submit button ── */
.r24-btn {
    width: 100% !important;
    margin-top: 20px !important;
    background: var(--r24-orange) !important;
    border: none !important;
    border-radius: var(--r24-radius) !important;
    color: #fff !important;
    cursor: pointer !important;
    font-size: 15px !important;
    font-weight: 700 !important;
    padding: 13px 24px !important;
    transition: background 0.15s, transform 0.1s !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 8px !important;
    text-transform: none !important;
    letter-spacing: normal !important;
    line-height: normal !important;
    height: auto !important;
    box-shadow: none !important;
    text-decoration: none !important;
}

.r24-btn:hover {
    background: var(--r24-orange-dk) !important;
    color: #fff !important;
}

.r24-btn:active {
    transform: scale(0.99) !important;
}

.r24-btn:disabled {
    opacity: 0.5 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

/* Spinner inside button */
.r24-btn__spinner {
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: r24-spin 0.65s linear infinite;
    display: none;
    flex-shrink: 0;
}

.r24-btn.r24-loading .r24-btn__spinner {
    display: block;
}

.r24-btn.r24-loading .r24-btn__label {
    display: none;
}

/* ── Trust bar ── */
.r24-trust {
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
    padding: 13px 24px;
    border-top: 1px solid var(--r24-border);
    background: #fafafa;
}

.r24-trust__item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 11.5px;
    color: var(--r24-muted);
}

.r24-trust__item svg {
    width: 12px;
    height: 12px;
    color: var(--r24-success);
}

/* ── Success screen ── */
.r24-success {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 28px 24px 24px;
    text-align: center;
    gap: 8px;
}

.r24-success__circle {
    width: 64px;
    height: 64px;
    background: #eaf7ea;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 4px;
}

.r24-success__circle svg {
    width: 30px;
    height: 30px;
    color: var(--r24-success);
}

.r24-success__title {
    font-size: 19px !important;
    font-weight: 700 !important;
    margin: 0 !important;
    color: var(--r24-text) !important;
}

.r24-success__body {
    font-size: 14px;
    color: var(--r24-text2);
    line-height: 1.6;
    max-width: 360px;
    margin: 0;
}

/* ── App promo (shown in success screen) ── */
.r24-app-promo {
    width: 100%;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--r24-border);
    text-align: center;
}

.r24-app-promo__title {
    font-size: 15px;
    font-weight: 700;
    color: var(--r24-text);
    margin: 0 0 6px;
}

.r24-app-promo__desc {
    font-size: 13px;
    color: var(--r24-text2);
    margin: 0 0 10px;
}

.r24-app-promo__list {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 0 16px;
    display: inline-block;
    text-align: left;
}

.r24-app-promo__list li {
    font-size: 13px;
    color: var(--r24-text2);
    padding: 3px 0 3px 22px !important;
    position: relative;
    line-height: 1.5;
    list-style: none !important;
}

.r24-app-promo__list li::before {
    content: '' !important;
    position: absolute;
    left: 0;
    top: 6px;
    width: 14px;
    height: 14px;
    background: var(--r24-orange);
    border-radius: 3px;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='3' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E");
    background-size: 10px;
    background-repeat: no-repeat;
    background-position: center;
}

.r24-app-promo__badges {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    justify-content: center;
}

.r24-badge-link {
    display: inline-block;
    line-height: 0;
}

.r24-badge {
    height: 40px;
    width: auto;
}

/* ── Footer note ── */
.r24-footer-note {
    font-size: 11.5px;
    color: var(--r24-muted);
    text-align: center;
    margin-top: 14px;
    line-height: 1.6;
    padding: 0 8px;
}

.r24-footer-note a {
    color: var(--r24-orange);
    text-decoration: none;
}

.r24-footer-note a:hover {
    text-decoration: underline;
}

/* ── Animation ── */
@keyframes r24-spin {
    to {
        transform: rotate(360deg);
    }
}