/* Light Mode Defaults (Tailwind handles most, these are overrides/base) */
body {
    font-family: 'Poppins', sans-serif;
    background-color: #F7FAFC; /* Very light gray */
    color: #2D3748; /* Dark charcoal text */
    line-height: 1.7;
    transition: background-color 0.3s, color 0.3s;
}
/* Dark Mode Styles */
.dark body {
    background-color: #1A202C; /* Slate 900 */
    color: #E2E8F0; /* Slate 200 */
}
.dark .header-bg {
    background-image: linear-gradient(to right, #319795, #2C7A7B); /* Darker Teal Gradient */
}
.dark .card {
    background-color: rgba(45, 55, 72, 0.85); /* Slate 800 with alpha for backdrop */
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-color: #4A5568; /* Slate 600 */
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.2);
}
.dark .timeline-item { border-left-color: #4A5568; /* Slate 600 */ }
.dark .timeline-item::before { background-color: #1A202C; color: #718096; } /* Matches dark body bg */
.dark .timeline-item.active { border-left-color: #38B2AC; } /* Teal 500 for active */
.dark .timeline-item.active::before { color: #4FD1C5 !important; }
.dark .timeline-item[data-icon="☀️"]::before { color: #F6E05E !important; }
.dark .timeline-item[data-icon="🌙"]::before { color: #A0AEC0 !important; }
.dark .timeline-item[data-icon="😴"]::before { color: #CBD5E0 !important; }
.dark .accent-text { color: #4FD1C5; } /* Teal 400 */
.dark .subtle-bg { background-color: #2D3748; } /* Slate 800 */
.dark .gemini-button, .dark .form-button, .dark .defaults-button, .dark .location-button, .dark .clear-button, .dark .save-activities-button {
    background-color: #38B2AC; /* Teal 500 */
}
.dark .gemini-button:hover, .dark .form-button:hover, .dark .defaults-button:hover, .dark .location-button:hover, .dark .clear-button:hover, .dark .save-activities-button:hover {
    background-color: #319795; /* Teal 600 */
}
.dark .suggestions-container { background-color: rgba(74, 85, 104, 0.9); border-color: #4A5568; } /* Slate 700 with alpha */
.dark .suggestion-close-button { color: #A0AEC0; } /* Slate 400 */
.dark .suggestion-close-button:hover { color: #E2E8F0; } /* Slate 200 */
.dark .loading-spinner { border-color: #4A5568; border-top-color: #4FD1C5; }
.dark .modal { background-color: rgba(26, 32, 44, 0.6); /* Slate 900 with alpha */ }
.dark .modal-content { background-color: rgba(45, 55, 72, 0.98); border-color: #4A5568; } /* Slate 800 */
.dark .modal-close-button { color: #A0AEC0; }
.dark .modal-close-button:hover { color: #E2E8F0; }
.dark .form-input {
    background-color: rgba(74, 85, 104, 0.8); /* Slate 700 with alpha */
    border-color: #4A5568; /* Slate 600 */
    color: #E2E8F0; /* Slate 200 */
}
.dark .form-input::placeholder { color: #A0AEC0; } /* Slate 400 */
.dark .form-input:focus {
    border-color: #4FD1C5; /* Teal 400 */
    box-shadow: 0 0 0 3px rgba(79, 209, 197, 0.4);
    background-color: rgba(74, 85, 104, 0.95); /* Slate 700 */
}
.dark .form-label { color: #CBD5E0; } /* Slate 300 */
.dark .settings-section { border-top-color: #4A5568; } /* Slate 600 */
.dark .planning-mode-toggle { background-color: #2D3748; border-color: #4A5568; } /* Slate 800 */
.dark .planning-mode-toggle label span { color: #E2E8F0; }
.dark .text-gray-500 { color: #A0AEC0; } /* Slate 400 for subtle text */
.dark .error-message-area { background-color: #4A5568; border-color: #E53E3E; color: #FEB2B2;}
.dark .saved-activities-list { background-color: #2D3748; border-color: #4A5568;}

/* General Styles (from previous) */
.header-bg {
    background-image: linear-gradient(to right, #4FD1C5, #38B2AC); /* Teal gradient */
    color: white;
    padding: 1.5rem 1rem;
    box-shadow: 0 4px 12px rgba(0,0,0,0.08);
}
.header-bg h1 { font-size: 2.25rem; font-weight: 700; }
.card {
    background-color: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-radius: 1rem;
    box-shadow: 0 10px 20px rgba(0, 0, 0, 0.07);
    padding: 2rem;
    margin-bottom: 2.5rem;
    border: 1px solid #E2E8F0;
}
.timeline-item { border-left: 4px solid #CBD5E0; padding-left: 2rem; position: relative; }
.timeline-item::before {
    content: attr(data-icon, '•');
    font-size: 1.25rem;
    position: absolute;
    left: -0.85rem;
    top: 0.3rem;
    background-color: #F7FAFC;
    padding: 0.1rem;
    border-radius: 50%;
    line-height: 1;
    z-index: 1;
    text-align: center;
    width: 1.5rem;
    height: 1.5rem;
}
.timeline-item[data-icon="☀️"]::before { color: #F59E0B; }
.timeline-item[data-icon="😴"]::before { color: #718096; }
.timeline-item[data-icon="🌙"]::before { color: #60A5FA; }
.timeline-item[data-icon="•"]::before { color: #A0AEC0; font-size: 1.8rem; top:-0.05rem; }
.timeline-item.active { border-left-color: #4FD1C5; }
.timeline-item.active::before {
    content: attr(data-icon-active, attr(data-icon, '☀️'));
    color: #4FD1C5 !important;
}

.accent-text { color: #38B2AC; }
.subtle-bg { background-color: #EDF2F7; }
.gemini-button, .form-button, .defaults-button, .location-button, .clear-button, .save-activities-button { background-color: #38B2AC; color: white; padding: 0.65rem 1.25rem; border-radius: 0.5rem; font-size: 0.9rem; font-weight: 600; transition: background-color 0.2s, transform 0.1s; border: none; cursor: pointer; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
.gemini-button:hover, .form-button:hover, .defaults-button:hover, .location-button:hover, .clear-button:hover, .save-activities-button:hover { background-color: #319795; transform: translateY(-1px); }
/* Specific style for the location button within the modal */
.location-button-modal {
    background-color: #38B2AC;
    color: white;
    padding: 0.5rem 0.75rem;
    /* Adjusted padding */
    border-radius: 0.5rem;
    font-size: 0.8rem;
    /* Adjusted font size */
    font-weight: 600;
    transition: background-color 0.2s, transform 0.1s;
    border: none;
    cursor: pointer;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    /* Removed white-space: nowrap; */
}

.location-button-modal:hover {
    background-color: #319795;
    transform: translateY(-1px);
}
.clear-button { background-color: #A0AEC0; } /* Gray for clear button */
.clear-button:hover { background-color: #718096; }
.suggestions-container { margin-top: 1rem; padding: 1rem; background-color: rgba(237, 242, 247, 0.9); backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px); border-radius: 0.5rem; font-size: 0.9rem; position:relative; border: 1px solid #E2E8F0; }
.suggestions-container ul { list-style-position: inside; padding-left: 0.5rem; }
.suggestions-container li { margin-bottom: 0.35rem; line-height: 1.5; }
.suggestions-container .checkbox-item { display: flex; align-items: flex-start; margin-bottom: 0.5rem; } /* Changed to flex-start */
.suggestions-container .checkbox-item input[type="checkbox"] { margin-right: 0.5rem; accent-color: #38B2AC; margin-top: 0.25rem; /* Align checkbox better with multi-line text */ }
.suggestions-container .checkbox-item label { flex: 1; } /* Allow label to take remaining space */
.suggestion-close-button { position: absolute; top: 0.35rem; right: 0.6rem; font-size: 1.35rem; line-height: 1; color: #718096; cursor: pointer; background: none; border: none; padding: 0.25rem;}
.suggestion-close-button:hover { color: #2D3748; }
.loading-spinner { border: 4px solid #E2E8F0; border-top: 4px solid #4FD1C5; border-radius: 50%; width: 24px; height: 24px; animation: spin 1s linear infinite; margin: 10px auto; }
@keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }
.modal { display: none; position: fixed; z-index: 9999; left: 0; top: 0; width: 100%; height: 100%; overflow: auto; background-color: rgba(45, 55, 72, 0.4); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }
.modal-content { background-color: rgba(255, 255, 255, 0.98); backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px); margin: 10% auto; padding: 2.5rem; border-radius: 1rem; width: 90%; max-width: 550px; box-shadow: 0 10px 30px rgba(0,0,0,0.1); position: relative; z-index: 10000; border: 1px solid #E2E8F0; }
.modal-content ul { list-style-position: inside; padding-left: 0.5rem; }
.modal-content li { margin-bottom: 0.35rem; line-height: 1.5; }
.modal-close-button { position: absolute; top: 1rem; right: 1rem; font-size: 1.75rem; font-weight: bold; color: #A0AEC0; cursor: pointer; }
.modal-close-button:hover { color: #4A5568; }
.form-input {
    border: 1px solid #CBD5E0;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    /* width: 100%; Removed to allow dynamic width */
    box-sizing: border-box;
    transition: border-color 0.2s, box-shadow 0.2s, width 0.2s; /* Added width transition */
    background-color: rgba(255, 255, 255, 0.9);
}
.form-input-dynamic-width {
    width: auto; /* Let content determine width */
    min-width: 120px; /* Increased minimum width for better initial fit */
    padding-left: 0.75rem; /* Tailwind pl-3 */
    padding-right: 0.75rem; /* Tailwind pr-3 */
    padding-top: 0.5rem; /* Padding for height */
    padding-bottom: 0.5rem; /* Padding for height */
    box-sizing: border-box; /* Ensure padding doesn't add to width in a way that breaks layout */
    line-height: 1.25; /* Adjust line height if text is vertically cut */
    vertical-align: middle; /* Align with adjacent buttons if needed */
}
.duration-inputs-container {
    display: flex;
    flex-wrap: wrap; /* Allow items to wrap to the next line */
    gap: 0.5rem; /* Spacing between input field wrappers */
    align-items: center; /* Align items vertically if they wrap and have different heights */
}
.input-field-wrapper {
    /* This class is added in script.js around each input */
    /* No specific styles needed here if gap on parent is sufficient,
       but it's a good selector if further styling per item is needed. */
    display: inline-block; /* Or flex, if internal alignment is needed */
}
.form-input:focus { border-color: #4FD1C5; box-shadow: 0 0 0 3px rgba(79, 209, 197, 0.3); outline: none; background-color: rgba(255, 255, 255, 1); }
.form-label { display: block; margin-bottom: 0.5rem; font-weight: 600; font-size: 0.9rem; color: #4A5568; }
.duration-inputs-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr)); gap: 1rem; }
.planning-mode-toggle {
    padding: 0.5rem;
    border-radius: 0.375rem;
    border: 1px solid #E2E8F0; /* Light mode border */
    background-color: #FFFFFF; /* Explicit white for light mode */
}
.planning-mode-toggle label span {
    color: #2D3748; /* Explicit dark text for light mode */
}
.planning-mode-toggle label { margin-right: 1.5rem; cursor: pointer; font-size: 0.95rem; }
.planning-mode-toggle input[type="radio"] { margin-right: 0.35rem; transform: scale(1.1); accent-color: #38B2AC;}
.settings-section { border-top: 1px solid #E2E8F0; padding-top: 1.5rem; margin-top: 1.5rem; }

.error-message-area {
    background-color: #FFF5F5; /* Light red background */
    color: #C53030; /* Darker red text */
    border: 1px solid #FC8181; /* Red border */
    padding: 0.75rem 1rem;
    border-radius: 0.375rem; /* rounded-md */
    margin-top: 1rem;
    font-size: 0.875rem; /* text-sm */
}
.error-message-area ul { list-style-position: inside; }
.header-toggle {
    background-color: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 0.5rem;
    border-radius: 9999px; /* rounded-full */
    cursor: pointer;
    font-size: 1.25rem; /* text-xl */
    transition: background-color 0.2s;
    width: 2.5rem; /* Fixed width */
    height: 2.5rem; /* Fixed height */
    display: flex;
    align-items: center;
    justify-content: center;
}
.header-toggle:hover {
    background-color: rgba(255,255,255,0.3);
}
.schedule-summary-card {
    background-color: #E6FFFA; /* Light teal background */
    border-left: 4px solid #38B2AC; /* Teal accent border */
}
.dark .schedule-summary-card {
    background-color: #2C7A7B; /* Darker teal for dark mode */
    border-left-color: #4FD1C5; /* Lighter teal accent */
}
.saved-activities-list {
    margin-top: 0.75rem; /* mt-3 */
    padding: 0.75rem; /* p-3 */
    background-color: #E6FFFA; /* Light teal */
    border-radius: 0.375rem; /* rounded-md */
    font-size: 0.875rem; /* text-sm */
    border: 1px solid #A7F3D0; /* Lighter teal border */
}
.saved-activities-list ul { list-style-type: disc; list-style-position: inside; padding-left: 0.5rem; }
.saved-activities-list li { margin-bottom: 0.25rem; }
.saved-activities-list strong { font-weight: 600; color: #2C7A7B; } /* Darker teal for title */
.dark .saved-activities-list strong { color: #81E6D9; } /* Lighter teal for dark mode title */
