/* Custom styles for Centre Locator Map */

* {
    transition: all 0.3s ease-in-out;
}

#map {
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
}

.gm-style .gm-style-iw {
    background-color: white;
    border-radius: 8px;
    padding: 0;
    margin: 0;
}

.gm-style .gm-style-iw > div {
    padding: 12px;
}

.gm-style .gm-style-iw h3 {
    margin: 0 0 8px 0;
    font-size: 16px;
    font-weight: bold;
    color: #1f2937;
}

.gm-style .gm-style-iw p {
    margin: 4px 0;
    font-size: 14px;
    color: #6b7280;
}

.gm-style .gm-style-iw .close {
    position: absolute;
    top: 8px;
    right: 12px;
    background: none;
    border: none;
    font-size: 18px;
    cursor: pointer;
    color: #9ca3af;
}

.gm-style .gm-style-iw .close:hover {
    color: #374151;
}

/* Search results */
#searchResults {
    max-height: 300px;
    overflow-y: auto;
    scrollbar-width: thin;
}

#searchResults::-webkit-scrollbar {
    width: 6px;
}

#searchResults::-webkit-scrollbar-track {
    background: #f3f4f6;
    border-radius: 3px;
}

#searchResults::-webkit-scrollbar-thumb {
    background: #d1d5db;
    border-radius: 3px;
}

#searchResults::-webkit-scrollbar-thumb:hover {
    background: #9ca3af;
}

/* Centre card in list */
.result-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 16px;
    padding: 18px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}

.result-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 16px;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(99, 102, 241, 0.08));
    opacity: 0;
    transition: opacity 0.25s ease;
    pointer-events: none;
}

.result-card:hover::after {
    opacity: 1;
}

.result-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 30px rgba(79, 70, 229, 0.12);
    border-color: rgba(59, 130, 246, 0.4);
}

.result-card h3 {
    font-size: 18px;
    font-weight: 700;
    color: #1f2937;
    margin: 0;
}

.result-card .result-subtitle {
    font-size: 14px;
    color: #6b7280;
    margin: 0;
}

.result-card .result-distance {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    font-weight: 600;
    color: #047857;
    background: rgba(16, 185, 129, 0.12);
    padding: 6px 10px;
    border-radius: 999px;
    align-self: flex-start;
}

.result-card .result-address {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.45;
}

.chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-radius: 999px;
    padding: 6px 10px;
    background: rgba(37, 99, 235, 0.12);
    color: #1d4ed8;
}

.chip--bhajan-group {
    background: rgba(192, 38, 211, 0.12);
    color: #86198f;
}

.chip--centre {
    background: rgba(16, 185, 129, 0.12);
    color: #047857;
}

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

.action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 8px 12px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    transition: all 0.2s ease;
    cursor: pointer;
    border: 1px solid transparent;
    text-decoration: none;
}

.action-button svg {
    width: 16px;
    height: 16px;
}

.action-button--primary {
    background: linear-gradient(135deg, #2563eb, #4c1d95);
    color: white;
    border-color: transparent;
    box-shadow: 0 8px 18px rgba(37, 99, 235, 0.18);
}

.action-button--primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 22px rgba(76, 29, 149, 0.2);
}

.action-button--secondary {
    background: white;
    color: #1f2937;
    border-color: #e5e7eb;
}

.action-button--secondary:hover {
    border-color: #cbd5f5;
    background: rgba(37, 99, 235, 0.06);
}

.action-button:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.35);
}

.bhajan-tag {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
    color: #7c3aed;
    background: rgba(124, 58, 237, 0.12);
    padding: 6px 10px;
    border-radius: 999px;
}

/* Loading spinner */
.loading-spinner {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid #f3f4f6;
    border-radius: 50%;
    border-top-color: #3b82f6;
    animation: spin 1s ease-in-out infinite;
}

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

/* Responsive */
@media (max-width: 640px) {
    #map {
        height: 400px;
    }
    
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* Custom map markers */
.pin {
    background: #3b82f6;
    border-radius: 50% 50% 50% 0;
    width: 20px;
    height: 25px;
    position: relative;
}

.pin::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid #3b82f6;
}

/* Tab buttons */
.tab-button {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 0.65rem 1.15rem;
    font-size: 0.95rem;
    font-weight: 600;
    color: #4b5563;
    background: rgba(255, 255, 255, 0.85);
    border: 1px solid rgba(226, 232, 240, 0.95);
    border-radius: 0.9rem;
    cursor: pointer;
    transition: all 0.22s ease;
}

.tab-button svg {
    width: 18px;
    height: 18px;
    transition: inherit;
}

.tab-button:hover {
    color: #1f2937;
    border-color: rgba(191, 219, 254, 0.8);
    box-shadow: 0 4px 12px rgba(148, 163, 184, 0.18);
}

.tab-button.active {
    color: #ffffff;
    background: linear-gradient(135deg, #2563eb, #4c1d95);
    border-color: transparent;
    box-shadow: 0 12px 26px rgba(79, 70, 229, 0.25);
}

.tab-button.active svg {
    color: inherit;
}
