.widget-builder-page {
    background:
        radial-gradient(circle at 16% 8%, rgba(243, 177, 57, 0.18), transparent 26%),
        radial-gradient(circle at 84% 0%, rgba(12, 142, 216, 0.16), transparent 32%),
        linear-gradient(180deg, #eef5fb 0%, #f7fbff 100%);
}

.widget-builder-main {
    width: min(1380px, 94vw);
    margin: 0 auto;
    padding-top: 1rem;
    padding-bottom: 1.5rem;
}

.widget-builder {
    display: grid;
    gap: 1rem;
}

.widget-builder__hero {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(5, 41, 89, 0.12);
    border-radius: 20px;
    padding: 1rem 1.15rem;
    background:
        radial-gradient(circle at 80% 18%, rgba(255, 255, 255, 0.18), transparent 30%),
        linear-gradient(135deg, #052959 0%, #0a4f8e 52%, #0c8ed8 100%);
    color: #f7fbff;
    box-shadow: var(--shadow-md);
}

.widget-builder__hero-copy {
    display: grid;
    gap: 0.35rem;
}

.widget-builder__eyebrow {
    margin: 0;
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(245, 251, 255, 0.88);
}

.widget-builder__hero .widget-builder__title {
    margin: 0;
    font-size: clamp(1.5rem, 1.2rem + 1.1vw, 2.2rem);
    line-height: 1.05;
    color: #ffffff;
}

.widget-builder__subtitle {
    margin: 0;
    max-width: 70ch;
    color: rgba(243, 252, 255, 0.94);
    font-size: 0.98rem;
    line-height: 1.35;
}

.widget-builder__grid {
    display: grid;
    gap: 1rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.widget-builder__card {
    border-radius: 18px;
    overflow: hidden;
}

.widget-builder__card .card-content {
    display: grid;
    gap: 1rem;
}

.widget-builder__preview-card .card-content {
    gap: 0.8rem;
}

.widget-builder__section-head {
    display: flex;
    gap: 0.9rem;
    align-items: flex-start;
}

.widget-builder__section-head h2,
.widget-builder__section-head h3 {
    margin: 0;
    color: #052959;
}

.widget-builder__section-head p {
    margin: 0.18rem 0 0 0;
    color: var(--color-text-muted);
}

.widget-builder__step {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 999px;
    background: linear-gradient(135deg, #f3b139, #f08f32);
    color: #052959;
    font-weight: 800;
    flex: 0 0 auto;
}

.widget-builder__field {
    display: grid;
    gap: 0.45rem;
}

.widget-builder__search-form,
.widget-builder__selection-form {
    display: grid;
    gap: 1rem;
}

.widget-builder__search-actions {
    display: flex;
    gap: 0.65rem;
    flex-wrap: wrap;
}

.widget-builder__field span {
    color: #163b6c;
    font-size: 0.92rem;
    font-weight: 700;
}

.widget-builder__field input[type="search"] {
    width: 100%;
    height: 50px;
    border: 1px solid rgba(5, 41, 89, 0.14);
    border-radius: 14px;
    padding: 0 1rem;
    background: #fff;
    font-size: 1rem;
    box-shadow: inset 0 1px 2px rgba(5, 41, 89, 0.04);
}

.widget-builder__field input[type="search"]:focus {
    border-color: rgba(12, 142, 216, 0.58);
    box-shadow: 0 0 0 3px rgba(12, 142, 216, 0.14);
}

.widget-builder__search-results,
.widget-builder__selected-list {
    display: grid;
    gap: 0.65rem;
}

.widget-builder__search-item,
.widget-builder__selected-item {
    padding: 0.85rem 0.95rem;
    border: 1px solid rgba(5, 41, 89, 0.12);
    border-radius: 14px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(246, 250, 255, 0.98));
}

.widget-builder__search-item {
    /*
    display: grid;
    grid-template-columns: 1.4rem auto;
    column-gap: 0.85rem;
    align-items: center;
    */
}

.widget-builder__selected-item {
    display: flex;
    gap: 0.85rem;
    align-items: flex-start;
}

.widget-builder__search-item input[type="checkbox"] {
    margin-top: 0;
    width: 1rem;
    height: 1rem;
    justify-self: center;
    align-self: center;
}

.widget-builder__search-copy,
.widget-builder__selected-copy {
    display: grid;
    gap: 0.28rem;
    flex: 1 1 auto;
    min-width: 0;
}

.widget-builder__search-copy .gasolinera_name,
.widget-builder__search-copy strong,
.widget-builder__selected-copy strong {
    display: block;
    color: #052959;
    overflow-wrap: anywhere;
    word-break: break-word;
    font-size: 1.2rem;
}

.widget-builder__search-copy .gasolinera_location,
.widget-builder__search-copy small,
.widget-builder__selected-copy small,
.widget-builder__selected-empty {
    display: block;
    color: var(--color-text-muted);
    font-size: 0.95rem;
    line-height: 1.4;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.widget-builder__selected-item {
    justify-content: space-between;
}

.widget-builder__remove {
    border: 0;
    background: transparent;
    color: #0a4f8e;
    font-size: 1.4rem;
    line-height: 1;
    cursor: pointer;
}

.widget-builder__selection-block {
    display: grid;
    gap: 0.65rem;
}

.widget-builder__selection-block h3 {
    margin: 0;
    color: #163b6c;
    font-size: 1rem;
}

.widget-builder__supply-grid {
    display: grid;
    gap: 0.65rem;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.widget-builder__supply-option {
    display: flex;
    gap: 0.7rem;
    align-items: center;
    min-height: 48px;
    padding: 0.75rem 0.9rem;
    border: 1px solid rgba(5, 41, 89, 0.12);
    border-radius: 14px;
    background: #fff;
}

.widget-builder__submit {
    justify-self: start;
}

.widget-builder__feedback {
    min-height: 1.2rem;
    margin: 0;
    color: var(--color-text-muted);
}

.widget-builder__feedback--danger {
    color: #a02828;
}

.widget-builder__preview-content {
    display: grid;
    gap: 1rem;
}

.widget-builder__embed-box {
    display: grid;
    gap: 0.75rem;
    padding: 1rem;
    border: 1px solid rgba(5, 41, 89, 0.12);
    border-radius: 16px;
    background: linear-gradient(180deg, rgba(240, 247, 255, 0.92), #fff);
}

.widget-builder__embed-head {
    display: flex;
    justify-content: space-between;
    gap: 1rem;
    align-items: flex-start;
}

.widget-builder__embed-head h3 {
    margin: 0;
    color: #052959;
}

.widget-builder__embed-head p {
    margin: 0.2rem 0 0 0;
    color: var(--color-text-muted);
}

.widget-builder__embed-actions {
    display: flex;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.widget-builder__snippet {
    margin: 0;
    padding: 0.95rem;
    border-radius: 14px;
    background: #091a2e;
    color: #f5fbff;
    overflow-x: auto;
    white-space: pre-wrap;
    word-break: break-word;
}

.widget-builder__snippet-input {
    width: 100%;
    min-height: 112px;
    margin: 0;
    padding: 0.95rem;
    border: 0;
    border-radius: 14px;
    background: #091a2e;
    color: #f5fbff;
    font: inherit;
    font-family: "Source Sans 3", sans-serif;
    resize: vertical;
}

.widget-station-table__scroller {
    overflow-x: auto;
    border: 1px solid rgba(5, 41, 89, 0.35);
    border-radius: 16px;
    background: #fff;
}

.widget-embed-shell__table-shell .widget-station-table__scroller {
    border-top: 0;
    border-radius: 0 0 16px 16px;
}

.widget-station-table__table {
    width: 100%;
    border-collapse: collapse;
}

.widget-station-table__table th,
.widget-station-table__table td {
    padding: 0.9rem 0.85rem;
    border-bottom: 1px solid rgba(5, 41, 89, 0.08);
    vertical-align: top;
}

.widget-station-table__table th {
    position: sticky;
    top: 0;
    z-index: 1;
    background: rgba(245, 249, 255, 0.96);
    color: #052959;
    font-weight: 800;
    text-align: left;
}

.widget-embed-shell__table-shell .widget-station-table__table th {
    background: linear-gradient(180deg, rgba(255, 248, 232, 0.98), rgba(245, 249, 255, 0.96));
    box-shadow: inset 0 -2px 0 rgba(243, 177, 57, 0.42);
}

.widget-station-table__table th[data-sortable="price"],
.widget-station-table__table td[data-type="price"] {
    text-align: center;
}

.widget-station-table__table tbody tr:nth-child(even) td {
    background: rgba(249, 249, 249, 0.96);
}

.widget-station-table__table td[data-type="price"] {
    min-width: 110px;
    font-weight: 700;
    white-space: nowrap;
}

.widget-station-table__station-cell {
    display: grid;
    gap: 0.2rem;
    min-width: 260px;
}

.widget-station-table__station-link {
    color: #1f252c;
    /*font-weight: 800;*/
}

.widget-station-table__station-meta,
.widget-station-table__station-address,
.widget-station-table__empty-price {
    color: var(--color-text-muted);
}

.widget-station-table__station-address,
.widget-station-table__station-meta {
    font-size: 0.8rem;
}

.widget-embed-page {
    margin: 0;
    background: transparent;
    font-family: "Source Sans 3", sans-serif;
    color: #163b6c;
}

.widget-embed-shell {
    width: 100%;
    max-width: 920px;
    margin-inline: auto;
    padding: 0.35rem;
    box-sizing: border-box;
}

.widget-embed-shell__table-shell {
    display: grid;
    gap: 0;
}

.widget-embed-shell__header {
    position: relative;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.85rem;
    padding: 0.8rem 0.95rem;
    border: 1px solid rgba(4, 120, 197, 0.28);
    border-bottom: 0;
    border-radius: 16px 16px 0 0;
    background:
        radial-gradient(circle at 14% 10%, rgba(253, 185, 29, 0.2), transparent 34%),
        linear-gradient(140deg, #052959 0%, #0a4f8e 50%, #0c8ed8 100%);
    box-shadow: var(--shadow-sm);
}

.widget-embed-shell__header-main {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    min-width: 0;
}

.widget-embed-shell__brand-icon {
    display: block;
    width: 18px;
    height: 18px;
    border-radius: 4px;
    box-shadow: 0 1px 2px rgba(5, 41, 89, 0.22);
}

.widget-embed-shell__logo {
    display: block;
    width: auto;
    height: 24px;
}

.widget-embed-shell__title {
    margin: 0;
    color: #ffffff;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.widget-embed-shell__powered-by {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    flex: 0 0 auto;
    color: #f5fbff;
    text-decoration: none;
}

.widget-embed-shell__powered-by:hover .widget-embed-shell__powered-by-label,
.widget-embed-shell__powered-by:focus-visible .widget-embed-shell__powered-by-label {
    text-decoration: underline;
}

.widget-embed-shell__powered-by-label {
    font-size: 0.86rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: rgba(245, 251, 255, 0.88);
}

.widget-embed-shell__updated-at {
    margin: 0.75rem 0 0 0;
    color: var(--color-text-muted);
    font-size: 0.92rem;
}

@media (max-width: 900px) {
    .widget-builder__grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 640px) {
    .widget-builder-main {
        width: min(96vw, 680px);
        padding-top: 0.6rem;
        padding-bottom: 1rem;
    }

    .widget-builder {
        gap: 0.75rem;
    }

    .widget-builder__hero {
        border-radius: 16px;
        padding: 0.8rem 0.9rem;
    }

    .widget-builder__hero-copy {
        gap: 0.22rem;
    }

    .widget-builder__eyebrow {
        font-size: 0.72rem;
    }

    .widget-builder__hero .widget-builder__title {
        font-size: clamp(1.2rem, 1rem + 2vw, 1.55rem);
    }

    .widget-builder__subtitle {
        font-size: 0.9rem;
        line-height: 1.28;
        max-width: none;
    }

    .widget-builder__embed-head {
        flex-direction: column;
    }

    .widget-builder__supply-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.55rem;
    }

    .widget-builder__supply-option {
        gap: 0.55rem;
        min-height: 44px;
        padding: 0.65rem 0.7rem;
    }

    .widget-builder__supply-option span {
        font-size: 0.95rem;
        line-height: 1.2;
    }

    .widget-station-table__table thead {
        display: none;
    }

    .widget-station-table__table,
    .widget-station-table__table tbody,
    .widget-station-table__table td {
        display: block;
        width: 100%;
    }

    .widget-station-table__table tr {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 0.55rem 0.6rem;
        padding: 0.85rem;
        border: 1px solid rgba(5, 41, 89, 0.08);
        background: rgba(255, 255, 255, 0.98);
    }

    .widget-station-table__table tbody tr:nth-child(even) {
        background: rgba(249, 249, 249, 0.96);
    }

    .widget-station-table__table td {
        width: auto;
        min-width: 0;
        padding: 0;
        border: 0;
    }

    .widget-station-table__table td:first-child {
        grid-column: 1 / -1;
    }

    .widget-station-table__table td:first-child::before {
        content: none;
        display: none;
    }

    .widget-station-table__table td::before {
        content: attr(data-label);
        display: block;
        margin-bottom: 0.16rem;
        color: #052959;
        font-weight: 800;
    }

    .widget-station-table__table td[data-type="price"] {
        min-width: 0;
        padding: 0.55rem 0.6rem;
        border: 1px solid rgba(5, 41, 89, 0.09);
        border-radius: 12px;
        background: rgba(255, 255, 255, 0.9);
        text-align: center;
    }

    .widget-station-table__table tbody tr:nth-child(even) td[data-type="price"] {
        background: rgba(255, 255, 255, 0.72);
    }

    .widget-station-table__table td[data-type="price"]::before {
        margin-bottom: 0.22rem;
        font-size: 0.82rem;
        line-height: 1.2;
    }

    .widget-station-table__station-cell {
        min-width: 0;
    }

    .widget-embed-shell__header {
        gap: 0.7rem;
        padding: 0.5rem 0.8rem;
        align-items: flex-start;
        flex-wrap: wrap;
    }

    .widget-embed-shell__logo {
        height: 18px;
    }

    .widget-embed-shell__brand-icon {
        width: 16px;
        height: 16px;
    }

    .widget-embed-shell__title {
        font-size: 0.8rem;
    }

    .widget-embed-shell__powered-by {
        justify-content: flex-start;
    }

    .widget-embed-shell__powered-by-label {
        font-size: 0.8rem;
    }
}
