/* Dealer Signup (left) & Launch TGB (right) — homepage side panels */

:root {
    --at-side-panel-w: min(380px, 31vw);
    --at-side-panel-top: 88px;
    --at-side-panel-bg: url("../img/shapes/box-bg-shape.png");
}

/* Edge tabs (open when panel collapsed) */
.at-side-panel-tab {
    position: fixed;
    top: 50%;
    z-index: 1040;
    transform: translateY(-50%);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.85rem 0.65rem;
    writing-mode: vertical-rl;
    text-orientation: mixed;
    font-size: 0.8125rem;
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #fff;
    background: #fc0012;
    border: none;
    border-radius: 0 10px 10px 0;
    box-shadow: 0 8px 24px rgba(252, 0, 18, 0.35);
    cursor: pointer;
    transition: background 0.2s ease, opacity 0.2s ease;
}

.at-side-panel-tab i {
    font-size: 0.75rem;
    writing-mode: horizontal-tb;
}

.at-side-panel-tab:hover {
    background: #c8000e;
}

.at-side-panel-tab--left {
    left: 0;
    border-radius: 0 10px 10px 0;
}

.at-side-panel-tab--right {
    right: 0;
    border-radius: 10px 0 0 10px;
}

.at-side-panel-tab.is-hidden {
    opacity: 0;
    pointer-events: none;
}

/* Panels */
.at-side-panel,
.left-sidebar,
.right-sidebar {
    position: fixed;
    top: var(--at-side-panel-top);
    bottom: 1.25rem;
    width: var(--at-side-panel-w);
    z-index: 1050;
    display: flex;
    flex-direction: column;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    box-shadow: 0 16px 48px rgba(0, 0, 0, 0.18);
    overflow: hidden;
    transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.at-side-panel--left,
.left-sidebar {
    left: 0;
    border-radius: 0 16px 16px 0;
    border-left: 4px solid #fc0012;
    transform: translateX(-105%);
}

.at-side-panel--right,
.right-sidebar {
    right: 0;
    left: auto;
    border-radius: 16px 0 0 16px;
    border-right: 4px solid #fc0012;
    transform: translateX(105%);
}

.at-side-panel.show,
.left-sidebar.show,
.right-sidebar.show {
    transform: translateX(0);
}

.at-side-panel__collapse,
.left-close-sidebar,
.right-close-sidebar {
    position: absolute;
    top: 0.65rem;
    right: 0.65rem;
    left: auto;
    z-index: 3;
    width: 32px;
    height: 32px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    border: none;
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.92);
    color: #4a4a4a;
    cursor: pointer;
    transform: none;
    font-size: 1rem;
    line-height: 1;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: background 0.2s ease, color 0.2s ease;
}

.at-side-panel__collapse:hover,
.left-close-sidebar:hover,
.right-close-sidebar:hover {
    background: rgba(252, 0, 18, 0.1);
    color: #fc0012;
}

.at-side-panel__inner,
.left-sidebar-content,
.right-sidebar-content {
    position: relative;
    isolation: isolate;
    flex: 1 1 auto;
    min-height: 0;
    overflow-x: hidden;
    overflow-y: visible;
    padding: 0.95rem 1rem 1.1rem;
    margin: 0 !important;
    background-color: #fafafa;
    background-image: var(--at-side-panel-bg);
    background-size: cover;
    background-position: center top;
    background-repeat: no-repeat;
    scrollbar-width: thin;
}

.at-side-panel__inner::before,
.left-sidebar-content::before,
.right-sidebar-content::before {
    content: "";
    position: absolute;
    inset: 0;
    background: rgba(255, 255, 255, 0.9);
    pointer-events: none;
    z-index: 0;
}

.at-side-panel__inner > *,
.left-sidebar-content > *,
.right-sidebar-content > * {
    position: relative;
    z-index: 1;
}

.at-side-panel__header {
    padding-right: 2.35rem;
    margin-bottom: 0.65rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
    padding-bottom: 0.75rem;
}

.at-side-panel__badge {
    display: inline-block;
    font-size: 0.6875rem;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #fc0012;
    background: rgba(252, 0, 18, 0.08);
    padding: 0.25rem 0.55rem;
    border-radius: 999px;
    margin-bottom: 0.5rem;
}

.at-side-panel__header h3,
.left-sidebar-content > h3,
.right-sidebar-content > h3 {
    font-size: 1.05rem;
    font-weight: 800;
    line-height: 1.25;
    color: #0d0d0d;
    margin: 0 0 0.35rem;
    letter-spacing: -0.02em;
}

.at-side-panel__header p,
.left-sidebar-content > p,
.right-sidebar-content > p {
    font-size: 0.8125rem;
    color: #4a4a4a;
    line-height: 1.45;
    margin: 0;
}

.at-side-panel__message,
#TGBdiscoverTxt,
#TGBcommunityTxt {
    font-size: 0.9rem;
    margin-bottom: 0.75rem;
    display: block;
}

.at-side-panel__message h3,
#TGBdiscoverTxt h3,
#TGBcommunityTxt h3 {
    font-size: 1rem;
    font-weight: 700;
    color: #16a34a;
    margin: 0;
}

.at-side-panel .form-group,
.left-sidebar .form-group,
.right-sidebar .form-group {
    margin-bottom: 0.5rem;
}

.at-side-panel label,
.left-sidebar label,
.right-sidebar label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: #4a4a4a;
    margin-bottom: 0.2rem;
}

.at-side-panel .form-control,
.at-side-panel .form-select,
.left-sidebar .form-control,
.right-sidebar .form-control {
    min-height: 36px;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
    font-size: 0.875rem;
    border-radius: 8px;
    border-color: #d1d5db;
    background: rgba(255, 255, 255, 0.95);
}

.at-side-panel .form-control:focus,
.left-sidebar .form-control:focus,
.right-sidebar .form-control:focus {
    border-color: #fc0012;
    box-shadow: 0 0 0 3px rgba(252, 0, 18, 0.12);
}

.at-side-panel .btn-primary,
.left-sidebar .btn-primary,
.right-sidebar .btn-primary {
    width: 100%;
    min-height: 40px;
    margin-top: 0.15rem;
    font-weight: 700;
    font-size: 0.875rem;
    border-radius: 8px;
    background: #fc0012 !important;
    border-color: #fc0012 !important;
    box-shadow: 0 4px 14px rgba(252, 0, 18, 0.3);
}

.at-side-panel .row.g-2 {
    --bs-gutter-y: 0.35rem;
    --bs-gutter-x: 0.5rem;
}

.left-close-sidebar span,
.right-close-sidebar span {
    display: none;
}

.at-side-panel .btn-primary:hover,
.left-sidebar .btn-primary:hover,
.right-sidebar .btn-primary:hover {
    background: #c8000e !important;
    border-color: #c8000e !important;
}

/* Hide legacy rotated tab styling */
.left-sidebar-btn,
.right-sidebar-btn {
    all: unset;
}

/* Homepage: room for open panels on hero */
@media (min-width: 1200px) {
    body.at-sidebars-active .rent-hero > .container {
        padding-left: calc(var(--at-side-panel-w) + 0.5rem);
        padding-right: calc(var(--at-side-panel-w) + 0.5rem);
    }

    body.at-sidebars-active .rent-hero-content {
        max-width: 640px;
        margin-left: auto;
        margin-right: auto;
    }
}

@media (max-height: 720px) and (min-width: 992px) {
    .at-side-panel__inner,
    .left-sidebar-content,
    .right-sidebar-content {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }
}

@media (max-width: 1199.98px) {
    :root {
        --at-side-panel-w: min(340px, 88vw);
        --at-side-panel-top: 72px;
    }
}

@media (max-width: 991.98px) {
    .at-side-panel,
    .left-sidebar,
    .right-sidebar {
        top: auto;
        bottom: 0;
        left: 0 !important;
        right: 0 !important;
        width: 100%;
        max-height: 78vh;
        border-radius: 16px 16px 0 0;
        transform: translateY(105%);
    }

    .at-side-panel__inner,
    .left-sidebar-content,
    .right-sidebar-content {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .at-side-panel.show,
    .left-sidebar.show,
    .right-sidebar.show {
        transform: translateY(0);
    }

    .at-side-panel--left,
    .at-side-panel--right,
    .left-sidebar,
    .right-sidebar {
        border-left: none;
        border-right: none;
        border-top: 4px solid #fc0012;
    }

    .at-side-panel-tab {
        writing-mode: horizontal-tb;
        top: auto;
        bottom: 1rem;
        transform: none;
        padding: 0.55rem 1rem;
        border-radius: 999px;
        font-size: 0.75rem;
    }

    .at-side-panel-tab--left {
        left: 1rem;
        right: auto;
    }

    .at-side-panel-tab--right {
        right: 1rem;
        left: auto;
    }

    body.at-home-sidebars .at-side-panel-tab--right {
        bottom: 4.25rem;
    }
}
