/* DeliveryGate Pro v2.1 — Meteorit */

.dg-wrap {
    margin: 16px 0;
    font-size: 12px;
    font-family: inherit;
    max-width: 400px;
}

/* ── Шапка с табами ── */
.dg-city-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    flex-wrap: nowrap;
    flex-direction: row;
    justify-content: flex-start;
}

.dg-label {
    font-weight: 600;
    color: #000;
    white-space: nowrap;
    font-size: 12px;
}

.dg-tabs {
    display: flex;
    background: #f0f0f0;
    border-radius: 20px;
    padding: 3px;
    gap: 2px;
}

.dg-tab {
    border: none;
    background: transparent;
    border-radius: 15px;
    padding: 5px 13px;
    font-size: 12px;
    color: #555;
    cursor: pointer;
    transition: all 0.18s ease;
    white-space: nowrap;
    line-height: 1.3;
    font-family: inherit;
}

.dg-tab:hover {
    color: #000000;
}

.dg-tab.active {
    background: #fff;
    color: #435792;
    font-weight: 500;
    box-shadow: 0 1px 4px rgba(0,0,0,0.12);
}

/* ── Блок контента ── */
.dg-box {
    background: #f8f9fa;
    border: 1px solid #e8e8e8;
    border-radius: 0px;
    padding: 12px 14px;
    min-height: 50px;
}

/* ── Строка доставки ── */
.dg-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 7px 0;
    border-bottom: 1px solid #eee;
    position: relative;
}

.dg-row:first-child { padding-top: 2px; }
.dg-row:last-child  { border-bottom: none; padding-bottom: 2px; }

.dg-row-icon {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
    line-height: 1;
}

.dg-row-body {
    display: flex;
    flex-direction: column;
    gap: 1px;
    min-width: 0;
}

.dg-row-title {
    font-size: 12px;
    font-weight: 500;
    color: #000000;
    line-height: 1.3;
    white-space: nowrap;
}

.dg-row-sub {
    font-size: 12px;
    color: #888;
    line-height: 1.3;
    white-space: nowrap;
}

/* Быстрая доставка — зелёный */
.dg-fast .dg-row-title { color: #1a8c45; }

/* Строка с ссылкой */
.dg-link-row {
    align-items: center;
}
.dg-link-row a {
    font-size: 12px;
    color: #DB4E42;
    text-decoration: none;
    white-space: nowrap;
}
.dg-link-row a:hover { text-decoration: underline; }

/* ── Загрузка ── */
.dg-loading {
    display: flex;
    align-items: center;
    gap: 8px;
    color: #aaa;
    font-size: 12px;
    padding: 4px 0;
}

.dg-spinner {
    width: 14px;
    height: 14px;
    border: 2px solid #ddd;
    border-top-color: #435792;
    border-radius: 50%;
    display: inline-block;
    animation: dg-spin 0.7s linear infinite;
    flex-shrink: 0;
}

@keyframes dg-spin { to { transform: rotate(360deg); } }

/* ── Tooltip ── */
[data-tooltip] { cursor: default; }

[data-tooltip]::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 6px);
    left: 34px;
    background: #000;
    color: #fff;
    font-size: 10px;
    line-height: 1.4;
    padding: 6px 10px;
    border-radius: 0px;
    width: 200px;
    white-space: normal;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.15s ease;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
}

[data-tooltip]:hover::after { opacity: 1; }

/* ── Мобильные ── */
@media (max-width: 400px) {
    .dg-tab { padding: 4px 10px; font-size: 12px; }
    .dg-row-title, .dg-row-sub { white-space: normal; }
    .dg-city-bar {
        display: flex;
        align-items: flex-start;
        gap: 5px;
        flex-wrap: nowrap;
        flex-direction: column;
        justify-content: flex-start;
    }
}
