/* =============================================
   Sicher - Hệ Thống Đại Lý v2.0  |  daily.css
   ============================================= */

/* -- Layout ----------------------------------------- */
.sicher-daily-wrapper {
    font-family: 'Segoe UI', Arial, sans-serif;
    padding: 0;
}

.sicher-row {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    align-items: flex-start;
}

.sicher-col-list {
    flex: 0 0 calc(38% - 10px);
    max-width: calc(38% - 10px);
    min-width: 260px;
}

.sicher-col-map {
    flex: 1;
    min-width: 0;
}

/* -- Province select --------------------------------- */
.sicher-city-select {
    width: 100%;
    padding: 8px 15px;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    font-size: 15px;
    background: #fff;
    cursor: pointer;
    margin-bottom: 14px;
    color: #333;
    transition: border-color .2s, box-shadow .2s;
    appearance: auto;
}

.sicher-city-select:focus {
    outline: none;
    border-color: #e63121;
    box-shadow: 0 0 0 3px rgba(230,49,33,.12);
}

/* -- Dealer list wrap -------------------------------- */
.sicher-list-wrap {
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    background: #fff;
    max-height: 500px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #e63121 #f5f5f5;
    box-shadow: 0 1px 4px rgba(0,0,0,.06);
}

.sicher-list-wrap::-webkit-scrollbar { width: 5px; }
.sicher-list-wrap::-webkit-scrollbar-thumb {
    background: #e63121;
    border-radius: 4px;
}

/* -- Dealer items ------------------------------------ */
.dealer-item {
    padding: 12px 14px;
    border-bottom: 1px solid #f3f4f6;
    cursor: pointer;
    transition: background .15s, border-left .15s, padding-left .15s;
    border-left: 3px solid transparent;
    position: relative;
}

.dealer-item:last-child { border-bottom: none; }

.dealer-item:hover {
    background: #fff5f4;
    border-left-color: #f0a9a3;
}

.dealer-item.active {
    background: #fff0ee;
    border-left-color: #e63121;
}

.dealer-name {
    font-weight: 700;
    font-size: 14px;
    text-transform: uppercase;
    color: #1a1a1a;
    margin: 0 0 5px;
    letter-spacing: .3px;
    line-height: 1.4;
}

.dealer-address,
.dealer-phone {
    font-size: 13px;
    color: #555;
    margin: 2px 0 !important;
    line-height: 1.5;
    padding: 0 !important;
}

.dealer-address i,
.dealer-phone i {
    color: #e63121;
    margin-right: 5px;
    font-size: 12px;
}

.dealer-phone a {
    color: #333;
    text-decoration: none;
}
.dealer-phone a:hover { color: #e63121; text-decoration: underline; }

.dealer-has-map {
    display: inline-block;
    margin-top: 5px;
    font-size: 11px;
    color: #e63121;
    font-weight: 600;
    letter-spacing: .3px;
}

/* -- Loading ---------------------------------------- */
.sicher-loading {
    padding: 20px 14px;
    color: #888;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sicher-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid #f0f0f0;
    border-top-color: #e63121;
    border-radius: 50%;
    animation: sicher-spin .7s linear infinite;
    flex-shrink: 0;
}

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

.no-dealer {
    padding: 24px 14px;
    color: #888;
    font-size: 14px;
    text-align: center;
}

/* -- Map area --------------------------------------- */
.sicher-col-map {
    position: sticky;
    top: 80px; /* adjust for WP admin bar or sticky header */
}

#sicher-map-wrap {
    width: 100%;
    height: 500px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    box-shadow: 0 2px 10px rgba(0,0,0,.08);
    background: #f8f9fa;
    transition: opacity .18s ease;
}

#sicher-map-wrap.map-switching {
    opacity: .4;
}

/* -- Iframe inner ----------------------------------- */
.sicher-map-inner {
    width: 100%;
    height: 100%;
}

.sicher-map-inner iframe {
    width: 100% !important;
    height: 100% !important;
    border: 0 !important;
    display: block;
}

/* -- Placeholder ------------------------------------ */
.sicher-map-placeholder {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #aaa;
    gap: 10px;
}

.sicher-map-placeholder .map-icon {
    font-size: 48px;
    line-height: 1;
    filter: grayscale(1);
    opacity: .5;
}

.sicher-map-placeholder p {
    font-size: 14px;
    color: #999;
    margin: 0 !important;
}

.sicher-map-placeholder strong {
    color: #555;
}

/* -- Responsive ------------------------------------- */
@media (max-width: 768px) {
    .sicher-row { flex-direction: column; }

    .sicher-col-list {
        flex: 0 0 100%;
        max-width: 100%;
    }

    .sicher-col-map {
        position: static;
        width: 100%;
    }

    #sicher-map-wrap {
        height: 320px;
    }

    .sicher-list-wrap {
        max-height: 360px;
    }
}
