/* 
 * Dubes Gas Tracker compiled CSS
 * This file replaces both the Tailwind CDN and the custom styles.css
 */

/* Base styles */
:root {
    --primary-color: #1a73e8;
    --secondary-color: #f1f3f4;
    --accent-color: #34a853;
    --danger-color: #ea4335;
    --text-color: #202124;
    --light-text: #5f6368;
    --border-color: #dadce0;
}

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

/* Base typography */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: var(--text-color);
    background-color: #f8f9fa;
    padding: 20px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    margin-bottom: 0.5rem;
}

h1 {
    color: var(--primary-color);
    font-size: 1.875rem;
    font-weight: 700;
}

h2 {
    color: var(--text-color);
    font-size: 1.5rem;
    margin-bottom: 15px;
}

h3 {
    color: var(--light-text);
    font-size: 1.25rem;
    margin-bottom: 10px;
}

a {
    color: var(--primary-color);
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

p {
    margin-bottom: 1rem;
}

/* Layout */
.container {
    max-width: 1000px;
    margin: 0 auto;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 20px;
}

.max-w-3xl {
    max-width: 48rem;
}

.max-w-5xl {
    max-width: 64rem;
}

.max-w-md {
    max-width: 28rem;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

.mx-4 {
    margin-left: 1rem;
    margin-right: 1rem;
}

.mt-8 {
    margin-top: 2rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mb-8 {
    margin-bottom: 2rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mr-3 {
    margin-right: 0.75rem;
}

.mr-2 {
    margin-right: 0.5rem;
}

.p-6 {
    padding: 1.5rem;
}

.p-4 {
    padding: 1rem;
}

.p-3 {
    padding: 0.75rem;
}

.p-2 {
    padding: 0.5rem;
}

.px-6 {
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.px-2 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.pb-6 {
    padding-bottom: 1.5rem;
}

.pb-3 {
    padding-bottom: 0.75rem;
}

/* Flex */
.flex {
    display: flex;
}

.flex-1 {
    flex: 1 1 0%;
}

.flex-shrink-0 {
    flex-shrink: 0;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.justify-center {
    justify-content: center;
}

.justify-end {
    justify-content: flex-end;
}

.space-x-3 > * + * {
    margin-left: 0.75rem;
}

.space-x-2 > * + * {
    margin-left: 0.5rem;
}

.space-y-12 > * + * {
    margin-top: 3rem;
}

.space-y-6 > * + * {
    margin-top: 1.5rem;
}

.space-y-2 > * + * {
    margin-top: 0.5rem;
}

.divide-y > * + * {
    border-top-width: 1px;
    border-top-style: solid;
}

.divide-gray-200 > * + * {
    border-color: #e8eaed;
}

/* Width and height */
.w-full {
    width: 100%;
}

.w-6 {
    width: 1.5rem;
}

.w-5 {
    width: 1.25rem;
}

.min-w-full {
    min-width: 100%;
}

.h-16 {
    height: 4rem;
}

.h-6 {
    height: 1.5rem;
}

.h-5 {
    height: 1.25rem;
}

/* Backgrounds and borders */
.bg-white {
    background-color: white;
}

.bg-gray-100 {
    background-color: #f1f3f4;
}

.bg-gray-50 {
    background-color: #f8f9fa;
}

.bg-primary {
    background-color: var(--primary-color);
}

.bg-blue-700 {
    background-color: #0d62c9;
}

.bg-blue-50 {
    background-color: #e8f0fe;
}

.bg-red-50 {
    background-color: #fce8e6;
}

.bg-green-50 {
    background-color: #e6f4ea;
}

.bg-red-600 {
    background-color: #d93025;
}

.bg-secondary {
    background-color: var(--secondary-color);
}

.bg-accent {
    background-color: var(--accent-color);
}

.bg-danger {
    background-color: var(--danger-color);
}

.bg-black {
    background-color: black;
}

.bg-opacity-50 {
    background-color: rgba(0, 0, 0, 0.5);
}

.border {
    border-width: 1px;
}

.border-b {
    border-bottom-width: 1px;
}

.border-gray-200 {
    border-color: #e8eaed;
}

.border-gray-300 {
    border-color: #dadce0;
}

.border-red-200 {
    border-color: #fad2cf;
}

.border-red-500 {
    border-color: var(--danger-color);
}

.border-green-500 {
    border-color: var(--accent-color);
}

.border-blue-500 {
    border-color: var(--primary-color);
}

.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-md {
    border-radius: 0.375rem;
}

.rounded {
    border-radius: 0.25rem;
}

.rounded-b-lg {
    border-bottom-left-radius: 0.5rem;
    border-bottom-right-radius: 0.5rem;
}

.overflow-hidden {
    overflow: hidden;
}

.overflow-x-auto {
    overflow-x: auto;
}

.shadow-md {
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.shadow-xl {
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.shadow-sm {
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

/* Text utilities */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.text-primary {
    color: var(--primary-color);
}

.text-accent {
    color: var(--accent-color);
}

.text-danger {
    color: var(--danger-color);
}

.text-gray-900 {
    color: #202124;
}

.text-gray-800 {
    color: #3c4043;
}

.text-gray-700 {
    color: #3c4043;
}

.text-gray-600 {
    color: #5f6368;
}

.text-gray-500 {
    color: #9aa0a6;
}

.text-white {
    color: white;
}

.text-red-700 {
    color: #c5221f;
}

.text-green-700 {
    color: #137333;
}

.text-blue-700 {
    color: #0d62c9;
}

.text-3xl {
    font-size: 1.875rem;
}

.text-xl {
    font-size: 1.25rem;
}

.text-lg {
    font-size: 1.125rem;
}

.text-base {
    font-size: 1rem;
}

.text-sm {
    font-size: 0.875rem;
}

.font-bold {
    font-weight: 700;
}

.font-semibold {
    font-weight: 600;
}

.font-medium {
    font-weight: 500;
}

.italic {
    font-style: italic;
}

.underline {
    text-decoration: underline;
}

/* Navigation Specific */
nav {
    margin-bottom: 20px;
}

nav a {
    text-decoration: none;
}

nav a:hover {
    text-decoration: none;
}

/* Form styles */
.form-group {
    margin-bottom: 15px;
}

label {
    display: block;
    margin-bottom: 5px;
    font-weight: 500;
}

.block {
    display: block;
}

input[type="text"],
input[type="email"],
input[type="date"],
input[type="number"],
select,
textarea {
    width: 100%;
    padding: 10px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 16px;
}

input:focus, textarea:focus, select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.focus\:outline-none:focus {
    outline: none;
}

.focus\:ring-2:focus {
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

.focus\:ring-primary:focus {
    box-shadow: 0 0 0 2px rgba(26, 115, 232, 0.2);
}

button {
    background-color: var(--primary-color);
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 15px;
    font-size: 16px;
    cursor: pointer;
    transition: background-color 0.3s;
}

button:hover {
    background-color: #0d62c9;
}

/* Button variations */
.danger-btn {
    background-color: var(--danger-color);
}

.danger-btn:hover {
    background-color: #c5221f;
}

.hover\:bg-blue-700:hover {
    background-color: #0d62c9;
}

.hover\:bg-gray-100:hover {
    background-color: #f1f3f4;
}

.hover\:bg-gray-50:hover {
    background-color: #f8f9fa;
}

.hover\:bg-gray-400:hover {
    background-color: #dadce0;
}

.hover\:bg-red-700:hover {
    background-color: #c5221f;
}

.hover\:bg-red-600:hover {
    background-color: #d93025;
}

.hover\:bg-green-700:hover {
    background-color: #0f9d58;
}

.hover\:border-gray-300:hover {
    border-color: #dadce0;
}

/* Tables */
table {
    border-collapse: collapse;
}

.data-table,
.min-w-full {
    width: 100%;
    margin-bottom: 20px;
}

th,
td {
    padding: 12px;
    text-align: left;
}

thead th {
    background-color: var(--secondary-color);
    font-weight: 600;
}

tbody td {
    border-bottom: 1px solid var(--border-color);
}

tfoot td {
    font-weight: 600;
}

/* Purchase Type Toggle Styling */
#clubCardLabel,
#personalCardLabel {
    display: inline-block;
    padding: 0.5rem 1rem;
    cursor: pointer;
}

#clubCardLabel.bg-white,
#personalCardLabel.bg-white {
    background-color: white;
    color: var(--primary-color);
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.1);
}

#clubCardLabel.text-gray-500,
#personalCardLabel.text-gray-500 {
    color: #9aa0a6;
}

/* Admin specific styles */
.admin-dashboard section {
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-color);
}

/* Positioning utilities */
.fixed {
    position: fixed;
}

.absolute {
    position: absolute;
}

.relative {
    position: relative;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

.z-50 {
    z-index: 50;
}

.z-10 {
    z-index: 10;
}

/* Transformations and transitions */
.transform {
    transform: translateX(0) translateY(0) rotate(0) skewX(0) skewY(0) scaleX(1) scaleY(1);
}

.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.transition {
    transition-property: background-color, border-color, color, fill, stroke, opacity, box-shadow, transform;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 150ms;
}

.duration-200 {
    transition-duration: 200ms;
}

/* Success and error messages */
.message {
    padding: 1rem;
    margin-top: 1.25rem;
    border-radius: 0.375rem;
    display: none;
}

.message:not(:empty) {
    display: block;
}

.success {
    background-color: #e6f4ea;
    border: 1px solid #34a853;
    color: #137333;
}

.error {
    background-color: #fce8e6;
    border: 1px solid #ea4335;
    color: #c5221f;
}

/* Display utilities */
.hidden {
    display: none;
}

.block {
    display: block;
}

.inline-block {
    display: inline-block;
}

/* Cursor */
.cursor-pointer {
    cursor: pointer;
}

/* Firebase emulator indicator - captured for completeness */
.emulator-indicator {
    position: fixed;
    bottom: 10px;
    right: 10px;
    background-color: #ff5722;
    color: white;
    padding: 5px 10px;
    border-radius: 4px;
    font-size: 12px;
    z-index: 9999;
}

/* Media queries */
@media (min-width: 768px) {
    .md\:flex {
        display: flex !important;
    }

    .md\:hidden {
        display: none !important;
    }

    .md\:w-1\/2 {
        width: 50% !important;
    }
}

@media (max-width: 767px) {
    body {
        padding: 10px;
    }

    .container {
        padding: 15px;
    }

    .md\:hidden {
        display: flex;
    }

    .md\:flex {
        display: none;
    }

    button {
        width: 100%;
    }
}

/* lg breakpoint variants (site nav collapses to hamburger below 1024px) */
@media (min-width: 1024px) {
    .lg\:flex {
        display: flex !important;
    }

    .lg\:hidden {
        display: none !important;
    }
}

@media (max-width: 1023px) {
    .lg\:hidden {
        display: flex;
    }

    .lg\:flex {
        display: none;
    }
}

/* Toast Notification System.
   Toasts are STATUS BANNERS, not buttons: card background, colored accent
   edge, icon, default cursor. They sit center-screen (where modals load),
   so any flow that opens a modal must clear stale toasts first. */
.toast-container {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
    width: 80%;
    max-width: 400px;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
    pointer-events: none;
}

.toast-container.visible {
    opacity: 1;
    visibility: visible;
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 6px;
    background-color: var(--container-bg, #ffffff);
    color: var(--text-color, #121212);
    border: 1px solid var(--border-color, #9e9e9e);
    border-left-width: 4px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
    text-align: left;
    margin-bottom: 16px;
    font-weight: 500;
    cursor: default;
    animation: toast-in-out 0.3s ease-in-out;
}

.toast::before {
    font-weight: 700;
    flex-shrink: 0;
}

.toast-success {
    border-left-color: var(--accent-color);
}

.toast-success::before {
    content: '\2713';
    color: var(--accent-color);
}

.toast-error {
    border-left-color: var(--danger-color);
}

.toast-error::before {
    content: '\26A0';
    color: var(--danger-color);
}

.toast-info {
    border-left-color: var(--primary-color);
}

.toast-info::before {
    content: '\2026';
    color: var(--primary-color);
}

@keyframes toast-in-out {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Delete button styling */
.delete-ski-record-btn,
.delete-gas-record-btn {
    background-color: transparent !important;
    border: none;
    padding: 5px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--danger-color);
    transition: background-color 0.2s;
}

.delete-ski-record-btn:hover,
.delete-gas-record-btn:hover {
    background-color: rgba(234, 67, 53, 0.1) !important;
    color: #c5221f !important;
}

/* Override any button styling for these specific buttons */
button.delete-ski-record-btn,
button.delete-gas-record-btn {
    width: auto;
    background-color: transparent !important;
}

/* Mobile menu button styling */
#mobileMenuButton {
    background-color: transparent !important;
    border: none;
    padding: 8px;
    border-radius: 4px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-color);
    transition: background-color 0.2s;
    width: auto !important;
}

#mobileMenuButton:hover {
    background-color: rgba(26, 115, 232, 0.1) !important;
}

#mobileMenuButton:focus {
    outline: none;
}

/* Utilities for the "Current Conditions" nav link (new-tab icon sizing/alignment) */
.inline-flex {
    display: inline-flex;
}

.h-4 {
    height: 1rem;
}

.w-4 {
    width: 1rem;
}

.gap-1 {
    gap: 0.25rem;
}

.gap-2 {
    gap: 0.5rem;
} 