/* Propertunity Client — Base Styles
   Override anything here from your theme, or add /propertunity/ templates
   in your theme folder to fully replace markup. */

/* ── Variables ─────────────────────────────────────────────────────────── */
:root {
    --pty-primary:      #2563eb;
    --pty-primary-dark: #1d4ed8;
    --pty-text:         #111827;
    --pty-muted:        #6b7280;
    --pty-border:       #e5e7eb;
    --pty-radius:       8px;
    --pty-shadow:       0 1px 3px rgba(0,0,0,.1), 0 1px 2px rgba(0,0,0,.06);
    --pty-shadow-hover: 0 4px 6px rgba(0,0,0,.07), 0 2px 4px rgba(0,0,0,.06);
}

/* ── Grid ──────────────────────────────────────────────────────────────── */
.pty-grid {
    display: grid;
    gap: 24px;
    margin-top: 20px;
}
.pty-grid--cols-2 { grid-template-columns: repeat(2, 1fr); }
.pty-grid--cols-3 { grid-template-columns: repeat(3, 1fr); }
.pty-grid--cols-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 900px) {
    .pty-grid--cols-3,
    .pty-grid--cols-4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 580px) {
    .pty-grid--cols-2,
    .pty-grid--cols-3,
    .pty-grid--cols-4 { grid-template-columns: 1fr; }
}

/* ── Card ──────────────────────────────────────────────────────────────── */
.pty-card {
    background: #fff;
    border: 1px solid var(--pty-border);
    border-radius: var(--pty-radius);
    box-shadow: var(--pty-shadow);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    transition: box-shadow .2s, transform .2s;
}
.pty-card:hover {
    box-shadow: var(--pty-shadow-hover);
    transform: translateY(-2px);
}
.pty-card__image-link { display: block; position: relative; }
.pty-card__image {
    width: 100%;
    height: 200px;
    object-fit: cover;
    display: block;
}
.pty-card__image--placeholder {
    height: 200px;
    background: #f3f4f6;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--pty-muted);
    font-size: 14px;
}
.pty-card__status {
    position: absolute;
    top: 10px;
    left: 10px;
    padding: 3px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .05em;
    background: rgba(0,0,0,.55);
    color: #fff;
}
.pty-status--active         { background: #16a34a; }
.pty-status--under-contract { background: #d97706; }
.pty-status--pending        { background: #7c3aed; }
.pty-status--sold           { background: #dc2626; }
.pty-status--coming-soon    { background: #0891b2; }

.pty-card__body { padding: 14px 16px; flex: 1; }
.pty-card__price {
    font-size: 20px;
    font-weight: 700;
    color: var(--pty-text);
    margin-bottom: 4px;
}
.pty-card__price-suffix { font-size: 13px; font-weight: 400; color: var(--pty-muted); }
.pty-card__address { font-size: 14px; color: var(--pty-text); margin-bottom: 8px; }
.pty-card__address strong { display: block; }
.pty-card__address span { color: var(--pty-muted); }
.pty-card__meta { display: flex; gap: 12px; flex-wrap: wrap; font-size: 13px; color: var(--pty-muted); margin-top: 8px; }
.pty-card__meta-item { display: flex; align-items: center; gap: 4px; }
.pty-card__attribution { font-size: 11px; color: var(--pty-muted); margin-top: 8px; }
.pty-card__concession { font-size: 12px; color: #16a34a; margin-top: 6px; font-weight: 600; }
.pty-card__cta {
    display: block;
    text-align: center;
    padding: 10px;
    background: var(--pty-primary);
    color: #fff;
    font-size: 13px;
    font-weight: 600;
    text-decoration: none;
    transition: background .15s;
}
.pty-card__cta:hover { background: var(--pty-primary-dark); color: #fff; }

/* ── Filters ───────────────────────────────────────────────────────────── */
.pty-filters {
    background: #f9fafb;
    border: 1px solid var(--pty-border);
    border-radius: var(--pty-radius);
    padding: 14px 16px;
    margin-bottom: 16px;
}
.pty-filters__row { display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.pty-filter-group { display: flex; flex-direction: column; gap: 4px; }
.pty-filter-group label { font-size: 12px; font-weight: 600; color: var(--pty-muted); text-transform: uppercase; letter-spacing: .05em; }
.pty-filter-group--search { flex: 1; min-width: 160px; }
.pty-filter-group--price { width: 110px; }
.pty-filter {
    border: 1px solid var(--pty-border);
    border-radius: 6px;
    padding: 7px 10px;
    font-size: 14px;
    background: #fff;
    min-width: 100px;
}
.pty-filter:focus { outline: 2px solid var(--pty-primary); outline-offset: -1px; }

/* ── Results count / no results ────────────────────────────────────────── */
.pty-results-count { font-size: 14px; color: var(--pty-muted); margin: 0 0 4px; }
.pty-no-results { text-align: center; padding: 40px; color: var(--pty-muted); grid-column: 1/-1; }

/* ── Pagination ────────────────────────────────────────────────────────── */
.pty-pagination { display: flex; gap: 6px; justify-content: center; margin-top: 28px; flex-wrap: wrap; }
.pty-page-btn {
    border: 1px solid var(--pty-border);
    background: #fff;
    border-radius: 6px;
    padding: 6px 12px;
    font-size: 14px;
    cursor: pointer;
    transition: background .15s;
}
.pty-page-btn:hover  { background: #f3f4f6; }
.pty-page-btn--active { background: var(--pty-primary); color: #fff; border-color: var(--pty-primary); }

/* ── Loading ───────────────────────────────────────────────────────────── */
.pty-loading { text-align: center; padding: 40px; }
.pty-loading__spinner {
    display: inline-block;
    width: 28px; height: 28px;
    border: 3px solid var(--pty-border);
    border-top-color: var(--pty-primary);
    border-radius: 50%;
    animation: pty-spin .7s linear infinite;
}
@keyframes pty-spin { to { transform: rotate(360deg); } }

/* ── Error ─────────────────────────────────────────────────────────────── */
.pty-error { background: #fef2f2; border: 1px solid #fecaca; border-radius: var(--pty-radius); padding: 14px 18px; color: #991b1b; font-size: 14px; }

/* ── Single listing ────────────────────────────────────────────────────── */
.pty-single__gallery-main img { width: 100%; max-height: 480px; object-fit: cover; border-radius: var(--pty-radius); }
.pty-single__gallery-thumbs { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.pty-thumb { width: 80px; height: 60px; object-fit: cover; border-radius: 4px; cursor: pointer; opacity: .85; transition: opacity .15s; }
.pty-thumb:hover { opacity: 1; }
.pty-thumb--more { display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.5); color: #fff; font-size: 13px; font-weight: 600; border-radius: 4px; }
.pty-single__layout { display: grid; grid-template-columns: 1fr 300px; gap: 32px; margin-top: 24px; }
@media (max-width: 768px) { .pty-single__layout { grid-template-columns: 1fr; } }
.pty-single__header { margin-bottom: 20px; }
.pty-single__address { font-size: 24px; font-weight: 700; margin: 0 0 4px; }
.pty-single__location { color: var(--pty-muted); margin: 0 0 12px; }
.pty-single__price { font-size: 28px; font-weight: 800; color: var(--pty-primary); margin-bottom: 8px; }
.pty-single__facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 12px; background: #f9fafb; border-radius: var(--pty-radius); padding: 16px; margin-bottom: 24px; }
.pty-fact { text-align: center; }
.pty-fact__label { display: block; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--pty-muted); margin-bottom: 4px; }
.pty-fact__value { font-size: 16px; font-weight: 700; color: var(--pty-text); }
.pty-single__description h2 { font-size: 18px; margin-bottom: 10px; }
.pty-mls-disclaimer { font-size: 11px; color: var(--pty-muted); border-top: 1px solid var(--pty-border); padding-top: 12px; margin-top: 16px; }
.pty-agent-card { background: #f9fafb; border: 1px solid var(--pty-border); border-radius: var(--pty-radius); padding: 16px; margin-bottom: 16px; }
.pty-agent-card h3 { margin: 0 0 8px; font-size: 14px; text-transform: uppercase; letter-spacing: .06em; color: var(--pty-muted); }
.pty-agent-card__name { font-weight: 700; font-size: 16px; margin: 0 0 4px; }
.pty-agent-card__office { color: var(--pty-muted); font-size: 13px; margin: 0 0 8px; }
.pty-agent-card__phone { display: block; color: var(--pty-primary); font-weight: 600; text-decoration: none; }

/* ── Buttons ───────────────────────────────────────────────────────────── */
.pty-btn { display: inline-block; padding: 10px 20px; border-radius: 6px; font-size: 14px; font-weight: 600; cursor: pointer; border: none; text-decoration: none; transition: background .15s; }
.pty-btn--primary { background: var(--pty-primary); color: #fff; }
.pty-btn--primary:hover { background: var(--pty-primary-dark); color: #fff; }
.pty-btn--secondary { background: #f3f4f6; color: var(--pty-text); border: 1px solid var(--pty-border); }
.pty-btn--secondary:hover { background: var(--pty-border); }

/* ── Valuation form ────────────────────────────────────────────────────── */
.pty-valuation-wrap { max-width: 600px; }
.pty-valuation__title { font-size: 22px; margin-bottom: 20px; }
.pty-field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.pty-field label { font-size: 13px; font-weight: 600; }
.pty-field input { border: 1px solid var(--pty-border); border-radius: 6px; padding: 9px 12px; font-size: 14px; }
.pty-field input:focus { outline: 2px solid var(--pty-primary); outline-offset: -1px; }
.pty-field-row { display: grid; grid-template-columns: 1fr 60px 100px; gap: 10px; }
.pty-required { color: #dc2626; }
.pty-valuation-result { background: #f0fdf4; border: 1px solid #bbf7d0; border-radius: var(--pty-radius); padding: 24px; text-align: center; }
.pty-valuation-result__value { font-size: 40px; font-weight: 800; color: #15803d; margin: 12px 0; }
.pty-valuation-result__range { color: var(--pty-muted); font-size: 14px; }
.pty-valuation-result__confidence { font-size: 13px; font-weight: 600; color: #16a34a; }
.pty-valuation-result__disclaimer { font-size: 11px; color: var(--pty-muted); margin-top: 16px; border-top: 1px solid #bbf7d0; padding-top: 12px; }

/* ── Search bar ────────────────────────────────────────────────────────── */
.pty-search__bar { display: flex; gap: 8px; }
.pty-search__input { flex: 1; border: 1px solid var(--pty-border); border-radius: 6px; padding: 10px 14px; font-size: 15px; }
.pty-search__input:focus { outline: 2px solid var(--pty-primary); outline-offset: -1px; }


.ptyc-oh {
    border: 1px solid var(--ptyc-border);
    border-radius: var(--ptyc-radius);
    padding: 16px 18px;
    background: var(--ptyc-bg);
    max-width: 420px;
}
.ptyc-oh-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}
.ptyc-oh-title {
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.ptyc-oh-status {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
}
.ptyc-oh-status.is-open {
    color: var(--ptyc-success);
    background: color-mix(in srgb, var(--ptyc-success) 14%, transparent);
}
.ptyc-oh-status.is-closed {
    color: var(--ptyc-danger);
    background: color-mix(in srgb, var(--ptyc-danger) 14%, transparent);
}
.ptyc-oh-list {
    list-style: none;
    margin: 0;
    padding: 0;
}
.ptyc-oh-row {
    display: grid;
    grid-template-columns: 92px 1fr 104px;
    align-items: center;
    gap: 12px;
    padding: 6px 8px;
    border-radius: var(--ptyc-radius);
}
.ptyc-oh-row.is-today {
    background: color-mix(in srgb, var(--ptyc-primary) 8%, transparent);
}
.ptyc-oh-day {
    font-size: 13px;
    color: var(--ptyc-muted);
}
.ptyc-oh-row.is-today .ptyc-oh-day {
    color: inherit;
    font-weight: 600;
}
.ptyc-oh-track {
    position: relative;
    height: 6px;
    border-radius: 3px;
    background: var(--ptyc-bg-dark);
}
.ptyc-oh-fill {
    position: absolute;
    top: 0;
    bottom: 0;
    background: var(--ptyc-primary);
    border-radius: 3px;
}
.ptyc-oh-range {
    font-size: 12px;
    text-align: right;
    color: var(--ptyc-muted);
}
.ptyc-oh-range.is-closed {
    opacity: 0.6;
}
.ptyc-oh--raw {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    color: var(--ptyc-muted);
    font-size: 13px;
}


.ptyc-cal {
    border: 1px solid var(--ptyc-border);
    border-radius: var(--ptyc-radius);
    padding: 16px 18px;
    background: var(--ptyc-bg);
    max-width: 560px;
}
.ptyc-cal-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 14px;
}
.ptyc-cal-title {
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}
.ptyc-cal-status {
    font-size: 12px;
    font-weight: 600;
    padding: 3px 10px;
    border-radius: 999px;
}
.ptyc-cal-status.is-open {
    color: var(--ptyc-success);
    background: color-mix(in srgb, var(--ptyc-success) 14%, transparent);
}
.ptyc-cal-status.is-closed {
    color: var(--ptyc-danger);
    background: color-mix(in srgb, var(--ptyc-danger) 14%, transparent);
}
.ptyc-cal-dowrow {
    display: grid;
    grid-template-columns: 40px repeat(7, 1fr);
    margin-bottom: 6px;
}
.ptyc-cal-dow {
    text-align: center;
    font-size: 12px;
    color: var(--ptyc-muted);
}
.ptyc-cal-dow.is-today {
    color: inherit;
    font-weight: 600;
}
.ptyc-cal-bodyrow {
    display: grid;
    grid-template-columns: 40px 1fr;
}
.ptyc-cal-gutter {
    position: relative;
    height: 300px;
}
.ptyc-cal-time {
    position: absolute;
    right: 6px;
    transform: translateY(-50%);
    font-size: 10px;
    color: var(--ptyc-muted);
}
.ptyc-cal-plot {
    position: relative;
    height: 300px;
    border: 1px solid var(--ptyc-border);
    border-radius: 8px;
    overflow: hidden;
    background: var(--ptyc-bg-dark);
}
.ptyc-cal-line {
    position: absolute;
    left: 0;
    right: 0;
    height: 1px;
    background: var(--ptyc-border);
    opacity: 0.55;
}
.ptyc-cal-cols {
    position: absolute;
    inset: 0;
    display: grid;
    grid-template-columns: repeat(7, 1fr);
}
.ptyc-cal-col {
    position: relative;
    border-left: 1px solid var(--ptyc-border);
}
.ptyc-cal-col:first-child {
    border-left: 0;
}
.ptyc-cal-col.is-today {
    background: color-mix(in srgb, var(--ptyc-primary) 8%, transparent);
}
.ptyc-cal-block {
    position: absolute;
    left: 3px;
    right: 3px;
    min-height: 14px;
    background: color-mix(in srgb, var(--ptyc-primary) 22%, var(--ptyc-bg));
    border: 1px solid var(--ptyc-primary);
    border-radius: 5px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}
.ptyc-cal-block.is-today {
    background: var(--ptyc-primary);
}
.ptyc-cal-block span {
    font-size: 9px;
    white-space: nowrap;
    padding: 0 2px;
}
.ptyc-cal-block.is-today span {
    color: var(--ptyc-bg);
    font-weight: 600;
}
.ptyc-cal-now {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--ptyc-danger);
    z-index: 3;
}




.ptyc-floorplans {
    display: flex;
    flex-wrap: wrap;
    gap: var(--gap);
}
.ptyc-floorplan {
    flex: 1 1 0;
    min-width: 140px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 14px 16px;
    border: 1px solid var(--ptyc-border);
    border-radius: var(--ptyc-radius);
    text-align: center;
}
.ptyc-floorplan-label {
    font-weight: 600;
    color: var(--ptyc-muted);
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.ptyc-floorplan-price {
    font-weight: 600;
    font-size: 1.05rem;
}

























.row {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: var(--gutter, 16px);
}

.col-1  { grid-column: span 1; }
.col-2  { grid-column: span 2; }
.col-3  { grid-column: span 3; }
.col-4  { grid-column: span 4; }
.col-5  { grid-column: span 5; }
.col-6  { grid-column: span 6; }
.col-7  { grid-column: span 7; }
.col-8  { grid-column: span 8; }
.col-9  { grid-column: span 9; }
.col-10 { grid-column: span 10; }
.col-11 { grid-column: span 11; }
.col-12 { grid-column: span 12; }

/* col-xs-* aliases the unprefixed col-* above */
.col-xs-1  { grid-column: span 1; }
.col-xs-2  { grid-column: span 2; }
.col-xs-3  { grid-column: span 3; }
.col-xs-4  { grid-column: span 4; }
.col-xs-5  { grid-column: span 5; }
.col-xs-6  { grid-column: span 6; }
.col-xs-7  { grid-column: span 7; }
.col-xs-8  { grid-column: span 8; }
.col-xs-9  { grid-column: span 9; }
.col-xs-10 { grid-column: span 10; }
.col-xs-11 { grid-column: span 11; }
.col-xs-12 { grid-column: span 12; }

@media (min-width: 576px) {
    .col-sm-1  { grid-column: span 1; }
    .col-sm-2  { grid-column: span 2; }
    .col-sm-3  { grid-column: span 3; }
    .col-sm-4  { grid-column: span 4; }
    .col-sm-5  { grid-column: span 5; }
    .col-sm-6  { grid-column: span 6; }
    .col-sm-7  { grid-column: span 7; }
    .col-sm-8  { grid-column: span 8; }
    .col-sm-9  { grid-column: span 9; }
    .col-sm-10 { grid-column: span 10; }
    .col-sm-11 { grid-column: span 11; }
    .col-sm-12 { grid-column: span 12; }
}

@media (min-width: 768px) {
    .col-md-1  { grid-column: span 1; }
    .col-md-2  { grid-column: span 2; }
    .col-md-3  { grid-column: span 3; }
    .col-md-4  { grid-column: span 4; }
    .col-md-5  { grid-column: span 5; }
    .col-md-6  { grid-column: span 6; }
    .col-md-7  { grid-column: span 7; }
    .col-md-8  { grid-column: span 8; }
    .col-md-9  { grid-column: span 9; }
    .col-md-10 { grid-column: span 10; }
    .col-md-11 { grid-column: span 11; }
    .col-md-12 { grid-column: span 12; }
}

@media (min-width: 992px) {
    .col-lg-1  { grid-column: span 1; }
    .col-lg-2  { grid-column: span 2; }
    .col-lg-3  { grid-column: span 3; }
    .col-lg-4  { grid-column: span 4; }
    .col-lg-5  { grid-column: span 5; }
    .col-lg-6  { grid-column: span 6; }
    .col-lg-7  { grid-column: span 7; }
    .col-lg-8  { grid-column: span 8; }
    .col-lg-9  { grid-column: span 9; }
    .col-lg-10 { grid-column: span 10; }
    .col-lg-11 { grid-column: span 11; }
    .col-lg-12 { grid-column: span 12; }
}

@media (min-width: 1200px) {
    .col-xl-1  { grid-column: span 1; }
    .col-xl-2  { grid-column: span 2; }
    .col-xl-3  { grid-column: span 3; }
    .col-xl-4  { grid-column: span 4; }
    .col-xl-5  { grid-column: span 5; }
    .col-xl-6  { grid-column: span 6; }
    .col-xl-7  { grid-column: span 7; }
    .col-xl-8  { grid-column: span 8; }
    .col-xl-9  { grid-column: span 9; }
    .col-xl-10 { grid-column: span 10; }
    .col-xl-11 { grid-column: span 11; }
    .col-xl-12 { grid-column: span 12; }
}

@media (min-width: 1400px) {
    .col-xxl-1  { grid-column: span 1; }
    .col-xxl-2  { grid-column: span 2; }
    .col-xxl-3  { grid-column: span 3; }
    .col-xxl-4  { grid-column: span 4; }
    .col-xxl-5  { grid-column: span 5; }
    .col-xxl-6  { grid-column: span 6; }
    .col-xxl-7  { grid-column: span 7; }
    .col-xxl-8  { grid-column: span 8; }
    .col-xxl-9  { grid-column: span 9; }
    .col-xxl-10 { grid-column: span 10; }
    .col-xxl-11 { grid-column: span 11; }
    .col-xxl-12 { grid-column: span 12; }
}

@keyframes modal-drop-in {
    from {
        opacity: 0;
        transform: translateY(-4rem);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes modal-drop-out {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-4rem);
    }
}

.pty-modal {

    position: fixed;
    inset: 0;
    background: var(--overlay);
    backdrop-filter: saturate(180%) blur(20px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    cursor: zoom-out;
    animation: modal-fade-in 0.15s ease-out;

    & * { color: var(--header-text); }

    &.is-dialog {
        cursor: default;
    }

    &.is-carousel {
        align-items: stretch;
        padding: 0;
    }

    &.is-lightbox img {
        max-width: 90vw;
        max-height: 90vh;
        object-fit: contain;
        border-radius: var(--border-radius);
        cursor: default;
    }

    & .pty-modal-box {

        background: var(--header-bg);
        border-radius: var(--border-radius);
        /*padding: var(--padding);*/
        max-width: 480px;
        width: 90%;
        max-height: 90vh;
        overflow-y: auto;
        overflow: visible;
        /*position: relative;*/
        cursor: default;
        box-shadow: var(--box-shadow);

        animation: modal-drop-in 0.25s ease-out;
        overflow: hidden;

        &.is-closing {
            animation: modal-drop-out 0.2s ease-in forwards;
        }

        &.is-submitting * {
            pointer-events: none;
        }

        & .pty-modal-header {

            display: flex;
            align-items: center;
            justify-content: space-between;
            border-bottom: 1px solid var(--border);
            /*margin-bottom: var(--padding);*/
            padding: var(--padding);

            & strong {

                /*color: var(--header-text);*/
                font-size: 24px;
                line-height: 36px;

            }

            & .pty-modal-close {

            }
        }

        & form {
                
            padding: 0px !important;

            & .input-group {

                margin-bottom: 0px;
            }

            .row [class^="col-"] { margin-bottom: 0px; }
            /*[class^="col-"]:last-of-type {

                margin-bottom: 0px;
            }*/
        }

        & .pty-modal-body {
            
            padding: var(--padding);

            & .pty-modal-message {
                text-align: center;
                font-size: 20px;
                line-height: 30px;
            }

            & .pty-modal-attach {

                display: flex;
                justify-content: center;
                align-items: center;

            }

            & .fwd-selected {

                margin-bottom: var(--padding);
                display: flex;
                gap: var(--padding);

                & .fwd-pill {
                    padding: var(--padding);
                    background-color: var(--box-border);
                    /*color: var(--header-text);*/
                    display: flex;
                    align-items: center;
                    gap: var(--padding);
                    border-radius: var(--badge-radius);
                }

            }

            & input {

            }

            & .dropdown-menu {

                display: block;

                position: relative;
                /*width: 450px !important;*/
                & a,
                & button {
                    padding: var(--padding);
                    /*height: auto;*/

                    & img {
                        width: var(--input-size);
                    }
                }
            }


        }

        & .pty-modal-footer {
            padding: var(--padding);
            display: flex;
            gap: var(--padding);
        }
    }
}





.input-group {
    height: var(--input-size);
    display: flex;
    align-items: stretch;

    & .input-group-text {
        color: var(--header-text);
        display: flex;
        align-items: center;
        justify-content: center;
        width: var(--input-size);
        background: var(--box-border);
        border: 1px solid var(--border);
        border-right: none;
        border-radius: var(--border-radius) 0 0 var(--border-radius);
        color: var(--text);
        flex-shrink: 0;

        & i { color: var(--header-text); }
    }

    & > .dropdown,
    & > .btn-group {
        flex: 1;
        min-width: 0;
    }

    & > .dropdown .dropdown-menu {
        left: calc(-1 * var(--input-size));
        width: calc(100% + var(--input-size)) !important;
    }

    & > .btn-group {
        border-radius: 0 var(--border-radius) var(--border-radius) 0;

        & .btn:first-of-type {
            border-radius: 0;
        }
    }

    & > .dropdown .dropdown-toggle {
        border-radius: 0 var(--border-radius) var(--border-radius) 0;
    }
}

/* Standalone dropdown — position/menu are identical either way; only the
   toggle's radius differs, handled by the more specific rule above when
   nested inside .input-group. */
.dropdown {
    position: relative;

    & .dropdown-toggle {
        width: 100%;
        text-align: left;
        background: var(--box-border);
        border: none;
        /*border: 1px solid var(--border);*/
        border-radius: var(--border-radius);
        padding: 0 calc(var(--padding) * 2) 0 var(--padding);
        height: var(--input-size, 44px);
        line-height: var(--input-size, 44px);
        color: var(--text);
        cursor: pointer;
        position: relative;

        &::after {
            content: '';
            position: absolute;
            right: var(--padding);
            top: 50%;
            width: 0;
            height: 0;
            border-left: 5px solid transparent;
            border-right: 5px solid transparent;
            border-top: 5px solid currentColor;
            transform: translateY(-50%);
        }

        &:hover {
            transform: unset;
        }
    }

    & .dropdown-menu {
        width: inherit !important;
        position: absolute !important;
        top: calc(100% + 4px);
        left: 0;
        z-index: 20;
        margin: 0;
        padding: 0;
        list-style: none;
        max-height: calc( var(--input-size) * 5 );
        overflow-y: auto;
        background: var(--header-bg);
        border: 1px solid var(--border);
        border-radius: var(--border-radius);
        box-shadow: var(--box-shadow);

        & li {

            padding: 0px;
            margin: 0px;

            &:hover { transform: unset; }
            &:active, &.active { transform: unset; }

            & .dropdown-item {
                display: block;
                /*padding: 8px var(--padding);*/
                color: var(--text);
                text-decoration: none;
                white-space: nowrap;
                cursor: pointer;

                &:hover,
                &.active {
                    background: var(--box-border);
                }

                &:hover { transform: unset; }
                &:active, &.active { transform: unset; }
            }
        }
    }
}

/* Standalone segmented group — full rounding on both ends. The
   .input-group override above squares the leading edge when nested. */
.btn-group {

    height: var(--input-size);
    display: flex;
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    overflow: hidden; /* clips children to the container's own radius */

    /* Hide the actual radio input — .btn-check pattern */
    & [type="radio"],
    & [type="checkbox"] {
        position: absolute;
        opacity: 0;
        pointer-events: none;

        /* Checked state — pure CSS via the adjacent sibling combinator,
           no JS class-toggling needed for the visual state */
        &:checked {
            & a,
            & label,
            & button {
                background: var(--brand);
                color: var(--header-bg);
            }
        }

        /* Keyboard focus visibility, since the real input is visually hidden */
        &:focus-visible {
            & a,
            & label,
            & button {
                outline: 2px solid var(--brand);
                outline-offset: -2px;
            }
        }
    }

    & a,
    & label,
    & button {
        flex: 1;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 0 var(--padding);
        height: var(--input-size);
        background: var(--header-bg);
        color: var(--text);
        border: none;
        border-left: 1px solid var(--border);
        cursor: pointer;
        user-select: none;
        white-space: nowrap;
        transition: background 0.15s ease, color 0.15s ease;

        &:first-of-type {
            border-left: none;
        }

        &:hover {
            background: var(--button-hover);
        }
    }
}


[type="submit"] {

    &.active  {

        position: relative;
        overflow: hidden;

        cursor: progress;

        & .icon-text-badge {
            position: relative;
            z-index: 2;

            & .icon {

                & i {

                    &.searching {
                        display: inline-block;
                        animation: search-ping 1.2s ease-in-out infinite;
                    }
                }
            }

            & .text {

                & .dot-wave {

                    & i {
                        display: inline-block;
                        font-style: normal;
                        animation: dot-wave 1.2s ease-in-out infinite;

                        &:nth-child(1) { animation-delay: 0s; }
                        &:nth-child(2) { animation-delay: 0.15s; }
                        &:nth-child(3) { animation-delay: 0.3s; }
                        &::before { content: '.'; }
                    }
                }
            }
        }
    }

    & .progress-overlay {
        position: absolute;
        top: 0;
        left: 0;
        height: 100%;
        width: 0%;
        background-color: var(--brand);
        z-index: 1;
        transition: width 0.1s linear;

        &.striped {
            background-image: linear-gradient(
                45deg,
                rgba(255, 255, 255, .15) 25%,
                transparent 25%,
                transparent 50%,
                rgba(255, 255, 255, .15) 50%,
                rgba(255, 255, 255, .15) 75%,
                transparent 75%,
                transparent
            );
            background-size: 40px 40px;
            animation: progress-bar-stripes 1s linear infinite;
        }
    }
}

@keyframes progress-bar-stripes {
    from { background-position: 40px 0; }
    to   { background-position: 0 0; }
}

@keyframes search-ping {
    0%, 100% {
        transform: scale(1);
        filter: drop-shadow(0 2px 2px rgba(0,0,0,0.3));
    }
    50% {
        transform: scale(1.35);
        filter: drop-shadow(0 6px 4px rgba(0,0,0,0.15));
    }
}

@keyframes dot-wave {
    0%, 60%, 100% { transform: translateY(0); }
    30%           { transform: translateY(-4px); }
}



