/* Reset & Base */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

:root {
    --primary: #500050;
    --primary-hover: #800080;
    --secondary: #64748b;
    --success: #22c55e;
    --warning: #f59e0b;
    --danger: #ef4444;
    --white: #ffffff;
    --gray-50: #f8fafc;
    --gray-100: #f1f5f9;
    --gray-200: #e2e8f0;
    --gray-300: #cbd5e1;
    --gray-400: #94a3b8;
    --gray-500: #64748b;
    --gray-600: #475569;
    --gray-700: #334155;
    --gray-800: #1e293b;
    --gray-900: #800080;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -2px rgba(0,0,0,0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -4px rgba(0,0,0,0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0,0,0,0.1), 0 8px 10px -6px rgba(0,0,0,0.1);
    --radius-sm: 6px;
    --radius: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

html, body {
    height: 100%;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--gray-800);
    background: var(--gray-100);
}

/* Splash Screen */
#splashScreen {
    position: fixed;
    inset: 0;
    background-color: #4f0051;
    z-index: 99999;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

#splashScreen.hidden {
    opacity: 0;
    visibility: hidden;
}

.splash-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 20px;
    animation: splashFadeIn 0.6s ease forwards;
}

.splash-logo {
    width: 320px;
    height: 320px;
    object-fit: contain;
}

.splash-title {
    color: #ffffff;
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    margin: 0;
    font-family: 'Inter', sans-serif;
}
.splash-text {
    color: #ffffff;
    font-size: 1.2rem;
    font-weight: 500;
    margin: 30px;
    text-align: center;
    font-family: 'Inter', sans-serif;
}

@keyframes splashFadeIn {
    from { opacity: 0; transform: translateY(12px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* Map */
#map {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 12px solid #500050;
    z-index: 1;
}

/* Floating Action Buttons */
.fab-container {
    position: fixed;
    bottom: 220px;
    right: 15px;
    display: flex;
    flex-direction: column-reverse;
    gap: 12px;
    z-index: 100;
}

.fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: transform 0.2s, box-shadow 0.2s, background-color 0.2s;
}

.fab:hover {
    transform: scale(1.05);
    box-shadow: var(--shadow-xl);
}

.fab:active {
    transform: scale(0.95);
}

.fab svg {
    width: 24px;
    height: 24px;
}

.fab-primary {
    background: var(--primary);
    color: var(--gray-900);
}

.fab-primary:hover {
    background: var(--primary-hover);
    color: var(--primary);
}

.fab-secondary {
    width: 48px;
    height: 48px;
    background: var(--white);
    color: var(--gray-600);
}

.fab-secondary:hover {
    background: var(--gray-50);
    color: var(--gray-800);
}

.fab-secondary svg {
    width: 20px;
    height: 20px;
}

/* Legend */
.legend {
    position: fixed;
    top: 24px;
    left: 24px;
    background: rgba(255, 255, 255, 0.8);
    padding: 16px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    z-index: 100;
    
}

.legend-title {
    font-weight: 600;
    margin-bottom: 2px;
    color: var(--gray-800);
    text-align: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
    font-size: 13px;
    color: var(--gray-600);
}

.legend-item:last-child {
    margin-bottom: 0;
}

.legend-marker {
    width: 14px;
    height: 14px;
    border-radius: 50%;
    flex-shrink: 0;
}

.legend-marker.red {
    background: var(--danger);
}

.legend-marker.orange {
    background: var(--warning);
}

.legend-marker.green {
    background: var(--success);
}

.legend-marker.grey {
    background: var(--gray-500);
}

.legend-marker.violet {
    background: var(--primary-hover);
}
.legend {
    transition: top 0.3s ease;
}

/* Mobile legend — compact horizontal dots only */
@media (max-width: 640px) {
    .legend {
        display: flex;
        flex-direction: row;
        align-items: flex-start;
        gap: 8px;
        padding: 6px 10px;
        min-width: unset;
    }

    .legend-title {
        margin-bottom: 0px;
        align-self: center;
    }

    .legend-title img {
        max-width: 60px;
        height: auto;
    }

    .legend-item {
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 4px;
        margin-bottom: 0;
        margin-top: 15px;   /* pushes each dot+label down */
    }

    .legend-marker {
        width: 12px;
        height: 12px;
    }

    .legend-item span:last-child {
        display: none;
    }

    .legend-item::after {
        display: block;
        font-size: 12px;
        color: #475569;
        text-align: right;
        line-height: 1.2;
        writing-mode: vertical-rl;
        text-orientation: mixed;
        transform: rotate(180deg);
        height: 42px;
    }

    .legend-item:nth-child(2)::after { content: "Active"; }
    .legend-item:nth-child(3)::after { content: "V Soon"; }
    .legend-item:nth-child(4)::after { content: "Soon"; }
    .legend-item:nth-child(5)::after { content: "Later"; }
    .legend-item:nth-child(6)::after { content: "Expired"; }
}
/* coffee button */
.fab-coffee {
    background: #FFDD00;
    color: #800080;
    font-size: 22px;
    width: 48px;
    height: 48px;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    transition: transform 0.2s, box-shadow 0.2s;
}

.fab-coffee:hover {
    transform: scale(1.05);
    background: #ffca00;
    box-shadow: var(--shadow-xl);
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
    z-index: 500;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    background: var(--white);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-xl);
    z-index: 600;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.3s;
}

.modal.active {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.modal.modal-small {
    max-width: 480px;
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid var(--gray-200);
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
    color: var(--gray-900);
}

.modal-close {
    width: 32px;
    height: 32px;
    border: none;
    background: var(--gray-100);
    border-radius: 50%;
    font-size: 20px;
    color: var(--gray-500);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, color 0.2s;
}

.modal-close:hover {
    background: var(--gray-200);
    color: var(--gray-700);
}

.modal-body {
    padding: 12px;
    overflow-y: auto;
    flex: 1;
}

/* Forms */
.form-section {
    margin-bottom: 24px;
}

.form-section:last-child {
    margin-bottom: 0;
}

.form-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: var(--gray-700);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group {
    margin-bottom: 16px;
}

.form-group:last-child {
    margin-bottom: 0;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    color: var(--gray-700);
    margin-bottom: 6px;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="date"],
input[type="time"],
textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--gray-300);
    border-radius: var(--radius);
    font-size: 14px;
    font-family: inherit;
    color: var(--gray-800);
    background: var(--white);
    transition: border-color 0.2s, box-shadow 0.2s;
}

input:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

input::placeholder,
textarea::placeholder {
    color: var(--gray-400);
}

textarea {
    resize: vertical;
    min-height: 80px;
}

.input-with-button {
    display: flex;
    gap: 8px;
}

.input-with-button input {
    flex: 1;
}

.input-with-button button {
    flex-shrink: 0;
}

.help-text {
    font-size: 12px;
    color: var(--gray-500);
    margin-top: 8px;
}
/* listing-notice */
.listing-notice {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #fffbeb;
    border: 1px solid #f59e0b;
    border-radius: var(--radius);
    padding: 14px 16px;
    margin-top: 24px;
}

.notice-icon {
    font-size: 18px;
    flex-shrink: 0;
    line-height: 1.4;
}

.notice-text {
    font-size: 13px;
    color: #92400e;
    line-height: 1.6;
}

.notice-text strong {
    display: block;
    margin-bottom: 4px;
    color: #78350f;
}

/* Mini Map */
.mini-map {
    width: 100%;
    height: 200px;
    border-radius: var(--radius);
    margin-top: 12px;
    border: 1px solid var(--gray-200);
}

/* Buttons */
.btn-primary,
.btn-secondary {
    padding: 10px 20px;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: background-color 0.2s, transform 0.1s;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-primary:active {
    transform: scale(0.98);
}

.btn-secondary {
    background: var(--gray-100);
    color: var(--gray-700);
    border: 1px solid var(--gray-300);
}

.btn-secondary:hover {
    background: var(--gray-200);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--gray-200);
}

/* About Content */
.about-content,
.about-content p,
.about-content li {
    text-align: justify;
}

.about-icon {
    font-size: 48px;
    margin-bottom: 6px;
    text-align: center;
}

.about-content p {
    margin-bottom: 16px;
    color: var(--gray-600);
}

.about-content h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-800);
    margin: 24px 0 12px;
    text-align: left;
}

.about-content ul {
    text-align: left;
    padding-left: 20px;
    color: var(--gray-600);
}

.about-content li {
    margin-bottom: 8px;
}

/* Info Window (Google Maps) */
.info-window {
    padding: 8px;
    max-width: 280px;
}

.info-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--gray-900);
    margin-bottom: 8px;
}

.info-address {
    font-size: 13px;
    color: var(--gray-600);
    margin-bottom: 12px;
}

.info-dates,
.info-times {
    font-size: 13px;
    color: var(--gray-700);
    margin-bottom: 4px;
}

.info-notes {
    font-size: 13px;
    color: var(--gray-600);
    margin-top: 12px;
    padding-top: 12px;
    border-top: 1px solid var(--gray-200);
}

.info-status {
    display: inline-block;
    margin-top: 12px;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.info-status.red {
    background: #fef2f2;
    color: var(--danger);
}

.info-status.orange {
    background: #fffbeb;
    color: #d97706;
}

.info-status.green {
    background: #f0fdf4;
    color: #16a34a;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    padding: 14px 20px;
    border-radius: var(--radius);
    background: var(--white);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
    max-width: 360px;
}

@keyframes slideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast.success {
    border-left: 4px solid var(--success);
}

.toast.error {
    border-left: 4px solid var(--danger);
}

.toast.info {
    border-left: 4px solid var(--primary);
}

.toast-icon {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.toast.success .toast-icon {
    color: var(--success);
}

.toast.error .toast-icon {
    color: var(--danger);
}

.toast.info .toast-icon {
    color: var(--primary);
}

.toast-message {
    flex: 1;
    font-size: 14px;
    color: var(--gray-700);
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.8);
    z-index: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid var(--gray-200);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Responsive */
@media (max-width: 640px) {
    .legend {
        top: auto;
        top: 20px;
        left: 20px;
        right: auto;
        padding: 12px;
    }

    .fab-container {
        bottom: 220px;
        right: 15px;
        gap: 8px;
    }

    .fab {
        width: 48px;
        height: 48px;
    }

    .fab-secondary {
        width: 40px;
        height: 40px;
    }

    .modal {
        width: 100%;
        max-width: none;
        height: 100%;
        max-height: none;
        border-radius: 0;
        transform: translate(-50%, -50%) translateY(20px);
    }

    .modal.active {
        transform: translate(-50%, -50%) translateY(0);
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .toast-container {
        left: 16px;
        right: 16px;
    }

    .toast {
        max-width: none;
    }
}

