/* ===========================================
   Ceylora Route Map — Stylesheet
   =========================================== */

/* ---- Section wrapper ---- */
.crm-section {
    background: #ffffff;
    padding: 60px 20px 40px;
    position: relative;
}

.crm-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 60% 40% at 20% 30%, rgba(199, 145, 60, 0.08) 0%, transparent 60%),
        radial-gradient(ellipse 40% 60% at 80% 70%, rgba(199, 145, 60, 0.05) 0%, transparent 60%);
    pointer-events: none;
}

.crm-inner {
    max-width: 1100px;
    margin: 0 auto;
    position: relative;
}

/* ---- Heading ---- */
.crm-title {
    display: block;
    color: #d31535;
    font-size: 13px;
    font-weight: 800;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 2.5px;
    margin: 0 0 20px;
}

.crm-title svg {
    display: none;
}

.crm-subtitle {
    display: none;
}

#crm-map-container {
    position: relative;
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 15px 40px rgba(0, 0, 0, 0.08);
}

#crm-map {
    height: 500px;
    width: 100%;
    background: #f4f4f4;
}

/* Grayscale light map tiles */
.leaflet-tile-pane {
    filter: grayscale(1) opacity(0.6) brightness(1.1);
}

/* Glowing red line */
.leaflet-overlay-pane path {
    filter: drop-shadow(0px 0px 8px rgba(211, 21, 53, 0.6));
}

/* Custom Numbered Markers */
.crm-numbered-marker {
    background: #d31535;
    color: #ffffff;
    font-weight: 700;
    font-size: 13px;
    border-radius: 50%;
    border: 2px solid #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 0 15px rgba(211, 21, 53, 0.9);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

/* ---- Loading overlay ---- */
#crm-loading {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 16px;
    background: rgba(255, 255, 255, 0.92);
    color: #333333;
    font-size: 1rem;
    z-index: 1000;
    backdrop-filter: blur(4px);
    transition: opacity 0.4s ease;
}

#crm-loading.hidden {
    opacity: 0;
    pointer-events: none;
}

.crm-spinner {
    width: 44px;
    height: 44px;
    border: 3px solid rgba(199, 145, 60, 0.2);
    border-top-color: #c7913c;
    border-radius: 50%;
    animation: crm-spin 0.9s linear infinite;
}

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

/* ---- Stops bar (Hidden to match design) ---- */
#crm-stops-bar {
    display: none !important;
}


/* ---- Controls ---- */
#crm-controls {
    display: none !important;
}

.crm-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: 50px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.2s ease;
    letter-spacing: 0.3px;
}

.crm-btn:active { transform: scale(0.97); }

.crm-btn-primary {
    background: linear-gradient(135deg, #c7913c, #e8b060);
    color: #0b1f3a;
}

.crm-btn-primary:hover {
    background: linear-gradient(135deg, #d4a045, #f0c070);
    box-shadow: 0 6px 20px rgba(199, 145, 60, 0.45);
}

.crm-btn-secondary {
    background: rgba(199, 145, 60, 0.15);
    color: #e8b060;
    border: 1px solid rgba(199, 145, 60, 0.35);
}

.crm-btn-secondary:hover {
    background: rgba(199, 145, 60, 0.25);
}

.crm-btn-ghost {
    background: rgba(255, 255, 255, 0.06);
    color: rgba(245, 230, 200, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

.crm-btn-ghost:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #f5e6c8;
}

/* ---- Leaflet marker overrides ---- */
.crm-plane-icon {
    background: transparent !important;
    border: none !important;
    display: flex;
    align-items: center;
    justify-content: center;
}

.crm-numbered-marker-wrapper {
    background: transparent !important;
    border: none !important;
}

/* ---- Hide default WP Travel Engine Map ---- */
#nb-6-configurations,
a#tab-6,
a#tab-6-mobile,
.tab-anchor-wrapper:has(a#tab-6),
.tab-anchor-wrapper:has(a#tab-6-mobile) {
    display: none !important;
}

/* ---- Popup ---- */
.leaflet-popup-content-wrapper {
    background: #ffffff !important;
    border: 1px solid rgba(220, 220, 220, 1) !important;
    border-radius: 12px !important;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15) !important;
    color: #333333 !important;
}

.leaflet-popup-tip {
    background: #ffffff !important;
}

.crm-popup-title {
    font-weight: 700;
    font-size: 1rem;
    color: #e8b060;
    margin-bottom: 4px;
}

.crm-popup-day {
    font-size: 0.8rem;
    color: #666666;
}

/* ---- Responsive ---- */
@media (max-width: 600px) {
    #crm-map { height: 320px; }
    .crm-section { padding: 50px 16px; }
    #crm-controls { justify-content: center; }
}
