@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Gloria+Hallelujah&display=swap');

:root {
    --primary-color: #333;
    --secondary-color: #97888B; /* Changed to #97888B */
    --accent-color: #d9a491;
    --text-color: #333;
    --bg-color: #ffebee; /* Lighter Powder Pink */
    --container-width: 900px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
    background-color: var(--bg-color);
    color: var(--text-color);
    line-height: 1.6;
}

.header {
    background-color: transparent;
    height: 33vh;
    padding: 0;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid #ddd;
}

.logo {
    height: 100%;
    width: 100%;
    object-fit: contain; /* Ensures the logo scales without distortion */
    cursor: pointer;
    -webkit-tap-highlight-color: transparent; /* Disable tap highlight on mobile */
}

.brand-title {
    margin: 0;
    font-size: 2rem;
    color: var(--primary-color);
}

.main-content {
    max-width: var(--container-width);
    margin: 2rem auto;
    padding: 0 1rem;
    text-align: center;
}

.main-content h2 {
    font-family: 'Playfair Display', serif;
    font-size: 2.5rem; /* Larger for prominence */
    font-weight: 700; /* Bold for dignity */
    color: var(--primary-color);
    line-height: 1.2;
    margin-bottom: 2rem;
}

.main-content h2 .highlight-handwritten {
    font-family: 'Gloria Hallelujah', cursive;
    color: #c08497; /* Dusty Rose */
    font-size: 1.2em; /* Slightly larger than surrounding text */
    text-shadow: 1px 1px 2px rgba(0,0,0,0.1);
    padding: 0 0.2em;
}

.locations-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.location-item {
    background-color: var(--secondary-color);
    padding: 1.5rem;
    border-radius: 8px;
    text-align: center;
    text-decoration: none;
    color: var(--text-color);
    font-size: 1.2rem;
    font-weight: 500;
    transition: transform 0.2s, box-shadow 0.2s;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.location-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 15px rgba(0,0,0,0.1);
}


/* Login Panel Styles */
.login-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 1010; /* Higher than admin panel just in case */
}

.login-panel.visible {
    display: flex; /* Shown when class is added */
}

.login-panel-content {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 400px;
    text-align: center;
}

.login-panel-content h3 {
    margin-top: 0;
}

#login-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

#login-form input {
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.login-error {
    color: #e74c3c;
    background-color: #fdd;
    border: 1px solid #e74c3c;
    padding: 0.8rem;
    border-radius: 4px;
    margin-top: 1rem;
}

.login-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
}

.login-actions button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.login-actions button[type="submit"] {
    background-color: var(--accent-color);
    color: white;
}

#login-cancel-btn {
    background-color: #95a5a6;
    color: white;
}


/* Admin Panel Styles */
.admin-panel {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.7);
    display: none; /* Hidden by default */
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.admin-panel.visible {
    display: flex; /* Shown when class is added */
}

.admin-panel-content {
    background: var(--bg-color);
    padding: 2rem;
    border-radius: 8px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.admin-panel-content h3 {
    margin-top: 0;
    text-align: center;
}

/* Styling for the new master list in the admin panel */
#admin-locations-list .admin-location-master-item {
    background-color: #f9f9f9;
    padding: 1rem;
    border: 1px solid #eee;
    border-radius: 4px;
    margin-bottom: 0.5rem;
    cursor: pointer;
    transition: background-color 0.2s;
}

#admin-locations-list .admin-location-master-item:hover {
    background-color: #f0f0f0;
}

.admin-location-master-item h4 {
    margin: 0 0 0.25rem 0;
    font-size: 1.1rem;
}

.admin-location-master-item p {
    margin: 0;
    color: #666;
    font-size: 0.9rem;
}

.admin-add-section {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid #eee;
    text-align: center;
}

#show-add-location-panel-btn {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    background-color: var(--accent-color);
    color: white;
}

#add-location-form, #edit-location-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    margin-top: 1.5rem;
}

#add-location-form h4, #edit-location-form h4 {
    margin-top: 0.5rem;
    margin-bottom: -0.5rem;
    font-size: 0.9rem;
    color: #555;
    font-weight: bold;
}


#add-location-form input, #edit-location-form input {
    padding: 0.8rem;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

.add-location-actions, .edit-location-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 1rem;
}

.add-location-actions button, .edit-location-actions button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

.add-location-actions button[type="submit"], 
.edit-location-actions button[type="submit"] {
    background-color: #2ecc71; /* Green for save */
    color: white;
}

#add-location-cancel-btn, #edit-location-cancel-btn {
    background-color: #95a5a6; /* Grey for cancel */
    color: white;
}

#edit-location-delete-btn {
    background-color: #e74c3c; /* Red for delete */
    color: white;
    margin-right: auto; /* Push delete button to the left */
}

.admin-main-actions {
    margin-top: 2rem;
    padding-top: 1rem;
    border-top: 1px solid #eee;
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.admin-main-actions button {
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
}

/* Specific button styles are now handled by their IDs or parent classes */
#admin-cancel-btn {
    background-color: #95a5a6;
    color: white;
}

#logout-btn {
    background: #c0392b;
    color: white;
}

/* Responsive */
@media (max-width: 600px) {
    .brand-title {
        font-size: 1.5rem;
    }
    .locations-container {
        grid-template-columns: 1fr;
    }
}
