/* =========================================================================
   Vibrant Homestay Booking Demo - Global Styles
   ========================================================================= */

:root {
    /* Color Palette - Vibrant & Tropical */
    --color-primary: #FF6B6B;
    /* Coral Red - actions */
    --color-secondary: #4ECDC4;
    /* Teal - secondary actions */
    --color-tertiary: #FFE66D;
    /* Sunshine Yellow - highlights */

    /* Neutrals */
    --color-bg: #FAFAFA;
    --color-surface: #FFFFFF;
    --color-text-primary: #2C3E50;
    --color-text-secondary: #596275;
    --color-border: #E8E8E8;

    /* Typography */
    --font-heading: 'Nunito', sans-serif;
    --font-body: 'Open Sans', sans-serif;

    /* Layout & Effects */
    --max-width: 1200px;
    --shadow-sm: 0 4px 6px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px rgba(0, 0, 0, 0.08);
    --shadow-hover: 0 15px 30px rgba(0, 0, 0, 0.12);
    --transition: all 0.3s ease;
    --border-radius: 12px;
}

/* ================= BASE STYLES ================= */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-body);
    color: var(--color-text-primary);
    background-color: var(--color-bg);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    line-height: 1.2;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 2rem;
}

/* ================= LAYOUT & UTILITIES ================= */
.mb-1 {
    margin-bottom: 0.5rem;
}

.mb-2 {
    margin-bottom: 1rem;
}

.mb-3 {
    margin-bottom: 2rem;
}

.mb-4 {
    margin-bottom: 3rem;
}

/* Demo Banner */
.demo-banner {
    background: var(--color-primary);
    color: white;
    text-align: center;
    padding: 0.5rem;
    font-size: 0.85rem;
    font-weight: 600;
}

.demo-banner.admin {
    background: var(--color-text-primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.8rem 1.5rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: var(--transition);
}

.btn-primary {
    background: var(--color-primary);
    color: white;
}

.btn-primary:hover {
    background: #ff5252;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background: var(--color-secondary);
    color: white;
}

.btn-secondary:hover {
    background: #45b8b0;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-whatsapp {
    background: #25D366;
    color: white;
    width: 100%;
    padding: 1rem;
    font-size: 1.1rem;
}

.btn-whatsapp:hover {
    background: #20BD5A;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* ================= NAVIGATION ================= */
.navbar {
    background: var(--color-surface);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 80px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--color-primary);
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    font-weight: 600;
    color: var(--color-text-secondary);
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--color-primary);
}

/* ================= ADMIN SPECIFIC ================= */
.admin-layout {
    display: flex;
    min-height: calc(100vh - 40px);
}

.admin-sidebar {
    width: 250px;
    background: var(--color-surface);
    border-right: 1px solid var(--color-border);
    padding: 2rem;
}

.admin-main {
    flex: 1;
    padding: 3rem;
    background: var(--color-bg);
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.admin-nav a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.8rem;
    border-radius: 8px;
    font-weight: 600;
    color: var(--color-text-secondary);
}

.admin-nav a.active {
    background: var(--color-primary);
    color: white;
}

.admin-nav a:not(.active):hover {
    background: rgba(255, 107, 107, 0.1);
    color: var(--color-primary);
}

/* Admin Tabs */
.admin-tab {
    display: none;
    animation: fadeIn 0.4s ease forwards;
}

.admin-tab.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ================= CALENDAR SHARED STYLES ================= */
.calendar-widget {
    background: var(--color-surface);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}

.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.calendar-header button {
    width: 35px;
    height: 35px;
    border-radius: 50%;
    background: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-text-primary);
    transition: var(--transition);
}

.calendar-header button:hover {
    background: var(--color-border);
}

.calendar-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 4px;
}

.calendar-day-header {
    text-align: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--color-text-secondary);
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
    margin-bottom: 0.5rem;
}

.calendar-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    font-size: 0.9rem;
}

/* Calendar States */
.calendar-day:not(.empty):hover {
    background: rgba(78, 205, 196, 0.2);
    /* Light teal hover */
}

.calendar-day.blocked {
    background: var(--color-border);
    color: #A0A0A0;
    text-decoration: line-through;
    cursor: not-allowed;
}

.calendar-day.blocked:hover {
    background: var(--color-border);
}

.calendar-day.past {
    color: #D0D0D0;
    cursor: default;
}

.calendar-day.past:hover {
    background: transparent;
}

/* Booking specific */
.calendar-day.selected {
    background: var(--color-secondary);
    color: white;
}

.calendar-day.in-range {
    background: rgba(78, 205, 196, 0.3);
    border-radius: 0;
}

.calendar-day.range-start {
    border-radius: 50% 0 0 50%;
}

.calendar-day.range-end {
    border-radius: 0 50% 50% 0;
}

/* Admin specific */
.admin-calendar .calendar-day.blocked {
    background: var(--color-primary);
    color: white;
    text-decoration: none;
    cursor: pointer;
}

.admin-calendar .calendar-day.blocked:hover {
    background: #ff5252;
}

/* Legend */
.calendar-legend {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    justify-content: center;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}

.legend-color {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.legend-color.available {
    background: transparent;
    border: 1px solid var(--color-border);
}

.legend-color.unavailable {
    background: var(--color-border);
}

.legend-color.selected {
    background: var(--color-secondary);
}

.admin-mode .legend-color.unavailable {
    background: var(--color-primary);
}

/* ================= TOAST NOTIFICATION ================= */
.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 9999;
}

.toast {
    background: var(--color-surface);
    color: var(--color-text-primary);
    padding: 1rem 1.5rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-md);
    margin-top: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    animation: slideIn 0.3s ease forwards;
    border-left: 4px solid var(--color-secondary);
}

.toast.error {
    border-left-color: var(--color-primary);
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}