/*
    Mobile-First Base Styling
*/

:root {
    --primary-color: #004b98; /* Royal Caribbean Blue */
    --secondary-color: #f7a93a; /* Accent Color */
    --bg-color: #f4f4f4;
    --text-color: #333;
    --card-bg: #fff;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Arial', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    padding-bottom: 60px; /* Space for fixed bottom navigation */
}

/* --- Header & Main Content --- */
.header {
    background-color: var(--primary-color);
    color: var(--card-bg);
    padding: 15px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 10;
}

.content-container {
    padding: 15px;
}

.tab-content {
    display: none;
    padding-top: 10px;
}

.tab-content.active {
    display: block;
}

h2 {
    color: var(--primary-color);
    margin-bottom: 20px;
    border-bottom: 2px solid var(--secondary-color);
    padding-bottom: 5px;
}

/* --- Fixed Bottom Navigation Bar --- */
.tabs-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    display: flex;
    background-color: #222;
    border-top: 1px solid #444;
    box-shadow: 0 -2px 5px rgba(0, 0, 0, 0.1);
    z-index: 20;
}

.tab-link {
    flex-grow: 1;
    background: none;
    border: none;
    padding: 10px 5px;
    color: #ccc;
    cursor: pointer;
    font-size: 10px;
    transition: all 0.3s;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.tab-link i {
    font-size: 18px;
    margin-bottom: 3px;
}

.tab-link.active {
    color: var(--secondary-color);
    background-color: #333;
}


/* --- Card Styles (Food, Events, Itinerary) --- */
.venue-card, .event-card, .itinerary-day {
    background-color: var(--card-bg);
    border-radius: 8px;
    padding: 15px;
    margin-bottom: 15px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
}

.venue-card h3 {
    margin-top: 0;
    color: var(--primary-color);
}

.cost-tag {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-weight: bold;
    font-size: 0.85em;
    margin-bottom: 5px;
}
.cost-tag.free { background-color: #d4edda; color: #155724; }
.cost-tag.paid { background-color: #f8d7da; color: #721c24; }
.gf-tag { font-style: italic; font-size: 0.9em; margin-bottom: 10px; }

/* --- Deck Styles --- */
.deck-section {
    background-color: var(--card-bg);
    border-left: 5px solid var(--secondary-color);
    padding: 10px 15px;
    margin-bottom: 15px;
    border-radius: 4px;
}
.deck-header {
    margin-bottom: 5px;
    color: #555;
}
.amenities-list, .itinerary-notes {
    list-style-type: none;
    padding-left: 0;
    margin-top: 5px;
}
.amenities-list li, .itinerary-notes li {
    padding: 2px 0;
    border-left: 2px solid #eee;
    padding-left: 10px;
    margin-left: 5px;
    font-size: 0.95em;
}

/* --- Daily Plan / Group Poll --- */
.day-header {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.group-poll {
    margin-top: 10px;
    border-top: 1px dashed #ddd;
    padding-top: 10px;
}

.poll-prompt {
    font-weight: bold;
    margin-bottom: 8px;
}

.poll-options {
    display: flex;
    gap: 10px;
    margin-bottom: 10px;
}

.poll-btn {
    flex: 1;
    padding: 8px 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s, border-color 0.2s;
}

.poll-btn.yes-btn { background-color: #e6ffe6; color: #155724; }
.poll-btn.no-btn { background-color: #ffe6e6; color: #721c24; }

/* Styles for when a button is selected by the current user */
.poll-btn.selected {
    border: 2px solid var(--primary-color);
    box-shadow: 0 0 5px rgba(0, 75, 152, 0.5);
    transform: scale(1.02);
}

.poll-results {
    font-size: 0.9em;
    padding-top: 5px;
    border-top: 1px solid #eee;
}
.poll-results p { margin: 3px 0; }
/* --- User Selector Styling for Daily Plan Tab --- */
.user-selector {
    display: flex;
    align-items: center;
    justify-content: flex-start;
    padding: 10px 0;
    margin-bottom: 10px;
    background-color: #e6e6e6; /* Light gray background */
    border-radius: 6px;
    padding: 10px 15px;
}

.user-selector label {
    font-weight: bold;
    color: var(--primary-color);
    margin-right: 10px;
    white-space: nowrap; /* Prevents text wrap */
}

#current-user-select {
    padding: 8px;
    border-radius: 4px;
    border: 1px solid #ccc;
    font-size: 1em;
    flex-grow: 1; /* Allows the select box to take up space */
    max-width: 150px;
}

#current-user-display {
    margin-left: auto !important; /* Pushes the status text to the right */
    font-size: 0.9em;
    color: #555;
    white-space: nowrap;
}

/* --- New Form and Button Styles --- */

.primary-action-btn {
    width: 100%;
    padding: 12px;
    background-color: var(--secondary-color); /* Orange/Accent color */
    color: white;
    border: none;
    border-radius: 6px;
    font-weight: bold;
    font-size: 1.1em;
    cursor: pointer;
    margin-bottom: 20px;
}

.event-form {
    background-color: var(--card-bg);
    padding: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    border: 1px solid var(--secondary-color);
}

.event-form label {
    display: block;
    font-weight: bold;
    margin-top: 10px;
    margin-bottom: 5px;
}

.event-form input[type="text"],
.event-form select {
    width: 100%;
    padding: 10px;
    margin-bottom: 10px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1em;
}

.event-form .form-note {
    font-size: 0.9em;
    color: #888;
    margin-bottom: 15px;
    border-top: 1px dashed #eee;
    padding-top: 10px;
}

.form-actions {
    display: flex;
    gap: 10px;
    margin-top: 15px;
}

.form-actions .submit-btn {
    flex-grow: 1;
    background-color: var(--primary-color);
    color: white;
    padding: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: bold;
}

.form-actions .cancel-btn {
    flex-grow: 1;
    background-color: #ccc;
    color: #333;
    padding: 10px;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

/* Day Header Style for dynamically inserted content */
.day-header {
    font-size: 1.2em;
    font-weight: bold;
    color: var(--primary-color);
    margin-top: 20px;
    margin-bottom: 10px;
    border-bottom: 2px solid #ddd;
    padding-bottom: 5px;
}

/* --- Delete Button Styling --- */
.delete-event-btn {
    float: right; /* Positions the button to the top right of the card */
    background: none;
    border: 1px solid #ccc;
    color: #cc0000; /* Red color for warning */
    padding: 3px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
    font-weight: bold;
    margin-top: -5px; /* Pulls it up slightly */
    transition: background-color 0.2s;
}

.delete-event-btn:hover {
    background-color: #ffe6e6;
}

.poll-btn:hover:not(.selected) {
    /* Lighter background when hovering, but not already selected */
    background-color: #f0f0f0; 
}

.filter-bar {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}
.filter-btn {
    padding: 8px 12px;
    border: 1px solid var(--primary-color);
    border-radius: 20px; /* Pill shape */
    background-color: white;
    color: var(--primary-color);
    cursor: pointer;
    font-weight: bold;
    transition: background-color 0.2s, color 0.2s;
}
.filter-btn.active,
.filter-btn:hover {
    background-color: var(--primary-color);
    color: white;
}
/* --- Visual cue for expandable content --- */
.event-card {
    /* Existing styles remain */
    cursor: pointer; /* Indicates the card is clickable */
}

/* Ensure buttons still have the default pointer */
.poll-btn, .delete-event-btn {
    cursor: pointer;
}
/* --- View Votes Button Styling --- */
.view-votes-btn {
    float: right; 
    clear: right; /* Forces it below the delete button */
    background-color: #f0f0f0; 
    border: 1px solid #ccc;
    color: var(--primary-color);
    padding: 3px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8em;
    font-weight: bold;
    margin-top: 5px; /* Space it down from the delete button */
    transition: background-color 0.2s;
}

.view-votes-btn:hover {
    background-color: #e0e0e0;
}
/* --- Collapse Button Styling --- */
.day-header {
    display: flex; /* Allows button alignment */
    justify-content: space-between;
    align-items: center;
    /* Existing styles remain */
}

.collapse-btn {
    background: none;
    border: none;
    color: var(--secondary-color);
    font-size: 1.2em;
    cursor: pointer;
    padding: 5px;
    margin-left: 10px;
    transition: color 0.2s;
}

.collapse-btn:hover {
    color: var(--primary-color);
}