/*
 * "Have Us Reach Out" — Side Popup Form
 * Appears on all pages as a tab on the right edge.
 * @package KadenceChild
 */

/* ── Tab trigger (always visible on right edge) ────────────── */
.usg-ro-tab {
    position: fixed;
    right: 0;
    top: 50%;
    transform: translateY(-50%) rotate(180deg);
    z-index: 100000;
    writing-mode: vertical-rl;
    background: var(--global-palette1, #ed1c24);
    color: #fff;
    font-family: Montserrat, sans-serif;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: .10em;
    text-transform: uppercase;
    padding: 18px 10px;
    cursor: pointer;
    border-radius: 0 0 8px 8px;
    box-shadow: -3px 0 16px rgba(237,28,36,.35);
    display: flex;
    align-items: center;
    gap: 8px;
    border: none;
    transition: padding .25s, background .2s;
    user-select: none;
}
.usg-ro-tab:hover {
    background: #c01019;
    padding: 22px 10px;
}
.usg-ro-tab svg {
    flex-shrink: 0;
    transform: rotate(180deg); /* counter the writing-mode rotation */
}

/* ── Panel ──────────────────────────────────────────────────── */
.usg-ro-panel {
    position: fixed;
    top: 0;
    right: -440px;
    width: 420px;
    max-width: 100vw;
    height: 100%;
    background: #fff;
    z-index: 100001;
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 48px rgba(0,0,0,.18);
    transition: right .35s cubic-bezier(.4,0,.2,1);
    overflow: hidden;
}
.usg-ro-panel.open {
    right: 0;
}

/* Panel header */
.usg-ro-header {
    background: linear-gradient(135deg, #0d0d10 0%, #1a0508 100%);
    padding: 125px 28px 24px;
    position: relative;
    flex-shrink: 0;
}
.usg-ro-header::after {
    content: '';
    position: absolute;
    bottom: 0; left: 0; right: 0;
    height: 3px;
    background: var(--global-palette1, #ed1c24);
}
.usg-ro-header-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-family: Montserrat, sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--global-palette1, #ed1c24);
    margin-bottom: 10px;
}
.usg-ro-header-tag::before {
    content: '';
    width: 18px; height: 2px;
    background: var(--global-palette1, #ed1c24);
}
.usg-ro-header h3 {
    font-family: Montserrat, sans-serif;
    font-size: 22px;
    font-weight: 800;
    color: #fff;
    margin: 0 0 6px;
    letter-spacing: -.02em;
    line-height: 1.2;
}
.usg-ro-header p {
    font-size: 13px;
    color: rgba(255,255,255,.55);
    margin: 0;
    line-height: 1.6;
}
.usg-ro-close {
    position: absolute;
    top: 120px; right: 20px;
    background: rgba(255,255,255,.08);
    border: 1px solid rgba(255,255,255,.12);
    color: rgba(255,255,255,.7);
    width: 32px; height: 32px;
    border-radius: 50%;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    font-size: 14px;
    transition: background .2s, color .2s;
    line-height: 1;
}
.usg-ro-close:hover {
    background: var(--global-palette1, #ed1c24);
    border-color: var(--global-palette1, #ed1c24);
    color: #fff;
}

/* Scrollable body */
.usg-ro-body {
    flex: 1;
    overflow-y: auto;
    padding: 24px 28px 28px;
    scrollbar-width: thin;
    scrollbar-color: #e0e0e0 transparent;
}
.usg-ro-body::-webkit-scrollbar { width: 4px; }
.usg-ro-body::-webkit-scrollbar-thumb { background: #ddd; border-radius: 2px; }

/* Form fields */
.usg-ro-field {
    margin-bottom: 16px;
}
.usg-ro-field label {
    display: block;
    font-family: Montserrat, sans-serif;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: #0d0d10;
    margin-bottom: 6px;
}
.usg-ro-field label .req {
    color: var(--global-palette1, #ed1c24);
    margin-left: 2px;
}
.usg-ro-field input,
.usg-ro-field select,
.usg-ro-field textarea {
    width: 100%;
    padding: 11px 14px;
    border: 1.5px solid #e0e0e8;
    border-radius: 8px;
    font-family: Poppins, sans-serif;
    font-size: 13px;
    color: #0d0d10;
    background: #fff;
    outline: none;
    transition: border-color .2s, box-shadow .2s;
    box-sizing: border-box;
    appearance: none;
    -webkit-appearance: none;
}
.usg-ro-field input:focus,
.usg-ro-field select:focus,
.usg-ro-field textarea:focus {
    border-color: var(--global-palette1, #ed1c24);
    box-shadow: 0 0 0 3px rgba(237,28,36,.08);
}
.usg-ro-field textarea {
    resize: vertical;
    min-height: 90px;
}
.usg-ro-field select {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238888a2' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 38px;
    cursor: pointer;
}

/* Two-col row */
.usg-ro-row-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

/* Trust strip */
.usg-ro-trust {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 20px;
    padding: 12px 14px;
    background: #f7f7f9;
    border-radius: 8px;
    border: 1px solid #e8e8f0;
}
.usg-ro-trust-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-family: Montserrat, sans-serif;
    font-size: 10px;
    font-weight: 700;
    letter-spacing: .04em;
    color: #52526a;
}
.usg-ro-trust-item svg {
    color: var(--global-palette1, #ed1c24);
    flex-shrink: 0;
}

/* Submit button */
.usg-ro-submit {
    width: 100%;
    padding: 14px;
    background: var(--global-palette1, #ed1c24);
    color: #fff;
    font-family: Montserrat, sans-serif;
    font-size: 14px;
    font-weight: 700;
    letter-spacing: .06em;
    text-transform: uppercase;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: background .2s, transform .15s, box-shadow .2s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 4px 14px rgba(237,28,36,.3);
    margin-top: 4px;
}
.usg-ro-submit:hover {
    background: #c01019;
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(237,28,36,.4);
}
.usg-ro-submit:active { transform: translateY(0); }
.usg-ro-submit .loading { display: none; }

.usg-ro-privacy {
    text-align: center;
    font-size: 11px;
    color: #aaa;
    margin: 10px 0 0;
}
.usg-ro-privacy svg {
    display: inline-block;
    vertical-align: middle;
    margin-right: 4px;
    color: #bbb;
}

/* Success state */
.usg-ro-success {
    display: none;
    text-align: center;
    padding: 32px 0;
}
.usg-ro-success-circle {
    width: 72px; height: 72px;
    background: rgba(237,28,36,.08);
    border: 2px solid rgba(237,28,36,.25);
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 20px;
}
.usg-ro-success-circle svg { color: var(--global-palette1, #ed1c24); }
.usg-ro-success h4 {
    font-family: Montserrat, sans-serif;
    font-size: 20px; font-weight: 800;
    color: #0d0d10; margin: 0 0 8px;
}
.usg-ro-success p {
    font-size: 13px; color: #52526a;
    line-height: 1.7; margin: 0 0 20px;
}
.usg-ro-success-close {
    display: inline-block;
    background: #0d0d10; color: #fff;
    font-family: Montserrat, sans-serif;
    font-size: 12px; font-weight: 700;
    letter-spacing: .06em; text-transform: uppercase;
    padding: 11px 24px; border-radius: 8px;
    border: none; cursor: pointer;
    transition: background .2s;
}
.usg-ro-success-close:hover { background: #ed1c24; }

/* Error msg */
.usg-ro-error {
    display: none;
    background: #fff5f5;
    border: 1px solid #fecaca;
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 13px;
    color: #c01019;
    margin-top: 12px;
}

/* Overlay */
.usg-ro-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    backdrop-filter: blur(2px);
    z-index: 100000;
}
.usg-ro-overlay.open { display: block; }

/* Responsive */
@media (max-width: 480px) {
    .usg-ro-panel { width: 100vw; }
    .usg-ro-row-2 { grid-template-columns: 1fr; }
}