/* Special churches map (basilicas, cathedrals) */

/* Dark background to prevent white flash while tiles load */
#map {
    background: #1a1a2e;
}

.special-marker-container {
    border: none;
    background: transparent;
}

.special-marker {
    width: 40px;
    height: 40px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.6), 0 0 0 2px rgba(240, 198, 116, 0.5);
    border: 2.5px solid rgba(240, 198, 116, 0.8);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.special-marker:hover {
    transform: scale(1.2);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.7), 0 0 0 3px rgba(240, 198, 116, 1);
    z-index: 2000;
}

.special-marker-inner {
    width: 30px;
    height: 30px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    font-size: 18px;
    line-height: 1;
    overflow: hidden;
}

/* Cross icon fills the circle nicely for no-website markers */
.special-marker-inner svg {
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.3));
}

.special-marker-favicon {
    background: rgba(255, 255, 255, 0.95);
    padding: 3px;
}

.special-marker-favicon img {
    border-radius: 12px;
}

/* Cluster icons — !important overrides map-core.css .marker-cluster div reset */
.marker-cluster .cluster-icon {
    border-radius: 50% !important;
    display: flex !important;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    border: 3px solid rgba(240, 198, 116, 0.7);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.6);
    transition: transform 0.2s ease;
}
.marker-cluster .cluster-icon:hover { transform: scale(1.1); }

.cluster-sm { background: linear-gradient(135deg, #f0c674, #d97706) !important; }
.cluster-md { background: linear-gradient(135deg, #d97706, #b45309) !important; }
.cluster-lg { background: linear-gradient(135deg, #b45309, #92400e) !important; }
.cluster-xl { background: linear-gradient(135deg, #92400e, #78350f) !important; }

.cluster-grid {
    position: absolute;
    inset: 4px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px;
    border-radius: 50%;
    overflow: hidden;
    opacity: 0.6;
}

.cluster-grid img {
    border-radius: 3px;
    object-fit: cover;
    background: rgba(255,255,255,0.9);
}

.cluster-cross {
    position: absolute;
    font-size: 22px;
    color: rgba(255,255,255,0.2);
    z-index: 0;
}

.cluster-count {
    position: relative;
    z-index: 1;
    font-weight: 700;
    font-size: 14px;
    color: #fff;
    text-shadow: 0 1px 4px rgba(0,0,0,0.9), 0 0 10px rgba(0,0,0,0.6);
    letter-spacing: -0.5px;
}
.cluster-sm .cluster-count { color: #1a1a2e; text-shadow: none; font-size: 14px; font-weight: 800; }
.cluster-sm .cluster-cross { color: rgba(0,0,0,0.15); }

.item-actions .item-action-link {
    cursor: pointer;
}

/* Improve cluster visibility */
.marker-cluster {
    background: transparent !important;
    border: none !important;
}

/* Ensure markers are always visible */
.special-marker-container {
    pointer-events: auto !important;
}

/* Dark-themed Leaflet popup overrides */
.leaflet-popup-content-wrapper {
    background: #1a2744;
    border: 1px solid rgba(240, 198, 116, 0.2);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    color: #e8e8e8;
}

.leaflet-popup-tip {
    background: #1a2744;
    border-right: 1px solid rgba(240, 198, 116, 0.2);
    border-bottom: 1px solid rgba(240, 198, 116, 0.2);
}

.leaflet-popup-close-button {
    color: #94a3b8 !important;
}

.leaflet-popup-close-button:hover {
    color: #f0c674 !important;
}

/* Popup content styling */
.popup-content {
    min-width: 200px;
    max-width: 300px;
}

.popup-header {
    margin-bottom: 8px;
}

.popup-title {
    font-weight: 600;
    font-size: 16px;
    color: #f0c674;
    margin-bottom: 4px;
}

.popup-location {
    font-size: 13px;
    color: #94a3b8;
    margin-bottom: 4px;
}

.popup-website {
    margin-top: 8px;
    padding-top: 8px;
    border-top: 1px solid rgba(240, 198, 116, 0.15);
}

.popup-website a {
    color: #f0c674;
    text-decoration: none;
    font-size: 13px;
}

.popup-website a:hover {
    text-decoration: underline;
    color: #fde68a;
}

/* Loading animation */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

.loading {
    animation: pulse 2s infinite;
}

/* Better item cards */
.item-card {
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
    cursor: pointer;
    border-left: 3px solid transparent;
}

.item-card:hover {
    transform: translateX(2px);
    border-left-color: #f0c674;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

.item-card:active {
    transform: translateX(0);
}

.item-name {
    font-size: 14px;
    font-weight: 600;
    line-height: 1.3;
}

.item-location {
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.4;
    margin-top: 2px;
}

.item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 8px;
}

.item-action-link {
    font-size: 12px;
    padding: 4px 10px;
    border-radius: 6px;
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.1);
    color: #e2e8f0;
    text-decoration: none;
    transition: all 0.15s;
}

.item-action-link:hover {
    background: rgba(240, 198, 116, 0.15);
    border-color: rgba(240, 198, 116, 0.4);
    color: #f0c674;
}

/* Card favicon */
.card-favicon {
    width: 18px;
    height: 18px;
    border-radius: 4px;
    flex-shrink: 0;
    background: rgba(255,255,255,0.9);
    object-fit: contain;
}

.item-header {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Card detail line (patron saint, rite) */
.item-detail {
    font-size: 11px;
    color: #64748b;
    line-height: 1.4;
    margin-top: 2px;
    font-style: italic;
}

/* Stats styling */
.stat-value {
    font-size: 24px;
    font-weight: 700;
    color: #f0c674;
}

.stat-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #94a3b8;
    margin-top: 4px;
}

