/**
 * NegocioGo control density
 * Final sizing layer shared by public, seller and authentication screens.
 * Page styles may change colors and widths, but not the regular control height.
 */

:where(
    button,
    input[type="button"],
    input[type="submit"],
    input[type="reset"],
    .btn,
    .app-btn,
    .dash-btn,
    .catalog-btn,
    .creator-btn-primary,
    .creator-btn-secondary,
    .profile-btn,
    .partner-btn,
    .stats-btn,
    .stores-btn,
    .sfv-btn,
    .sf-btn,
    a[class*="btn"]
):not([class*="close"]):not([aria-label="Cerrar"]):not([class*="icon-only"]):not([class*="stepper"]):not([class*="quantity"]):not([class*="mapboxgl"]):not([class*="toggle"]):not([class*="wa-phone"]):not(.negociogo-faq__trigger) {
    min-height: 36px !important;
    padding-top: 0.375rem !important;
    padding-bottom: 0.375rem !important;
    border-radius: 10px 10px 10px 4px !important;
    line-height: 1.2;
    box-sizing: border-box;
}

:where(
    .btn-sm,
    .btn--sm,
    .app-btn--sm,
    .dash-btn--sm,
    .catalog-btn--sm,
    .partner-btn--small,
    .sfv-btn--sm,
    button[class*="--sm"],
    a[class*="--sm"]
) {
    min-height: 30px !important;
    padding-top: 0.25rem !important;
    padding-bottom: 0.25rem !important;
    border-radius: 8px 8px 8px 3px !important;
}

:where(
    input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]):not([type="color"]):not([type="button"]):not([type="submit"]):not([type="reset"]),
    select:not([multiple]),
    .input:not(textarea),
    .form-control:not(textarea),
    .app-input,
    .app-select,
    .auth-input
):not([class*="wa-phone"]) {
    height: var(--ng-control-height) !important;
    min-height: var(--ng-control-height) !important;
    padding-top: 0 !important;
    padding-bottom: 0 !important;
    box-sizing: border-box;
}

select:not([multiple]),
.app-select {
    padding-right: 2.25rem !important;
}

/* Search composites must not create a second oversized control around the field. */
:where(.search-control, .search-field, .filter-search, .partner-search):has(input) {
    min-height: var(--ng-control-height);
}

/* Deliberate exceptions: multiline and touch-only controls size to their content. */
textarea,
select[multiple] {
    height: auto !important;
}

@media (max-width: 767px) {
    :where(
        input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):not([type="file"]):not([type="hidden"]):not([type="color"]):not([type="button"]):not([type="submit"]):not([type="reset"]),
        select:not([multiple]),
        .input:not(textarea),
        .form-control:not(textarea),
        .app-input,
        .app-select,
        .auth-input
    ):not([class*="wa-phone"]) {
        font-size: 16px;
    }
}

.qr-invoice-search input[type="search"] {
    width: 100% !important;
    height: 32px !important;
    min-height: 0 !important;
    margin: 0 !important;
    padding: 0 0.35rem !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
}

.qr-invoice-search button {
    height: 30px !important;
    min-height: 30px !important;
    padding: 0 0.65rem !important;
}

/* Seller workspace header: part of the page canvas, not a traditional navbar. */
body.creator-app .creator-topbar--integrated {
    position: static !important;
    top: auto;
    z-index: 50;
    padding-top: 8px;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

/* The authenticated account shell uses the same integrated treatment. */
body.seller-private-shell .site-nav-shell--seller {
    position: static;
    background: transparent;
}

body.seller-private-shell .seller-private-nav {
    position: static !important;
    top: auto;
    z-index: 50;
    padding-top: 8px;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
}

body.seller-private-shell .seller-private-nav__inner {
    width: calc(100% - 32px);
    max-width: var(--app-page-max-width-wide, 76rem);
    height: 52px;
    min-height: 52px;
    margin: 0 auto;
    padding: 0;
    gap: 14px;
}

.seller-private-nav__flow {
    position: relative;
    flex: 1;
    height: 1px;
    margin: 0 8px;
    background: linear-gradient(90deg, rgba(6, 140, 97, 0.2), rgba(203, 218, 213, 0.62) 42%, rgba(203, 218, 213, 0));
}

.seller-private-nav__flow::before {
    content: "";
    position: absolute;
    top: -2px;
    left: 0;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #0b956b;
    box-shadow: 0 0 0 4px rgba(11, 149, 107, 0.08);
}

body.creator-app .creator-topbar--integrated .creator-topbar-inner {
    width: calc(100% - 32px);
    max-width: var(--app-page-max-width-wide, 76rem);
    height: 52px;
    min-height: 52px;
    margin: 0 auto;
    padding: 0;
    gap: 14px;
}

.creator-topbar-flow {
    position: relative;
    flex: 1;
    height: 1px;
    margin: 0 8px;
    background: linear-gradient(90deg, rgba(6, 140, 97, 0.2), rgba(203, 218, 213, 0.62) 42%, rgba(203, 218, 213, 0));
}

.creator-topbar-flow::before {
    content: "";
    position: absolute;
    top: -2px;
    left: 0;
    width: 5px;
    height: 5px;
    border-radius: 50%;
    background: #0b956b;
    box-shadow: 0 0 0 4px rgba(11, 149, 107, 0.08);
}

body.creator-app .creator-topbar--integrated .creator-topbar-actions {
    margin-left: 0;
}

@media (max-width: 767px) {
    body.creator-app .creator-topbar--integrated {
        padding-top: 5px;
        border: 0 !important;
    }

    body.creator-app .creator-topbar--integrated .creator-topbar-inner {
        width: calc(100% - 24px);
        height: 48px;
        min-height: 48px;
        max-height: 48px;
        padding: 0;
    }

    .creator-topbar-flow {
        min-width: 14px;
        margin: 0;
        background: linear-gradient(90deg, rgba(6, 140, 97, 0.18), transparent);
    }

    .creator-topbar-flow::before {
        display: none;
    }

    body.seller-private-shell .seller-private-nav {
        padding-top: 5px;
    }

    body.seller-private-shell .seller-private-nav__inner {
        width: calc(100% - 24px);
        min-height: 48px;
        height: 48px;
        padding: 0;
    }
}

