/* ===========================
   MobiStay — Global Styles
   =========================== */

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

:root {
    --primary:      #FF385C;
    --primary-dark: #e31c5f;
    --gray-bg:      #F7F7F7;
    --shadow-card:  0 2px 16px rgba(0,0,0,0.10);
    --shadow-hover: 0 6px 24px rgba(0,0,0,0.14);
    --radius:       12px;
    --radius-full:  9999px;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, sans-serif;
    color: #222;
    background: #fff;
}

/* ---- Typography ---- */
h1, h2, h3, h4 { font-weight: 700; }
a { text-decoration: none; color: inherit; }

/* ---- Scrollbar ---- */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: #f1f1f1; }
::-webkit-scrollbar-thumb { background: #ccc; border-radius: 3px; }

/* ---- Focus ---- */
input:focus, textarea:focus, select:focus {
    outline: 2px solid var(--primary);
    outline-offset: 1px;
}

/* ---- Property Cards ---- */
.property-card {
    border-radius: var(--radius);
    overflow: hidden;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.property-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-hover);
}
.property-card .card-img {
    width: 100%;
    height: 220px;
    object-fit: cover;
    border-radius: var(--radius);
    transition: transform 0.4s ease;
}
.property-card:hover .card-img { transform: scale(1.03); }

/* ---- Wishlist heart ---- */
.wish-btn { position: absolute; top: 12px; right: 12px; background: none; border: none; cursor: pointer; color: white; transition: transform 0.15s ease; }
.wish-btn:hover { transform: scale(1.2); }
.wish-btn.active { color: var(--primary); }

/* ---- Skeleton ---- */
.skeleton {
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: 8px;
}
@keyframes shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }

/* ---- Pill / Badge ---- */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 9999px;
    font-size: 0.72rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}
.badge-pending   { background: #FEF3C7; color: #92400E; }
.badge-confirmed { background: #D1FAE5; color: #065F46; }
.badge-cancelled { background: #FEE2E2; color: #991B1B; }
.badge-completed { background: #E0E7FF; color: #3730A3; }
.badge-active    { background: #D1FAE5; color: #065F46; }
.badge-inactive  { background: #F3F4F6; color: #6B7280; }
.badge-featured  { background: #FEF3C7; color: #B45309; }

/* ---- Form inputs (shared) ---- */
.form-input {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #D1D5DB;
    border-radius: 10px;
    font-size: 0.9rem;
    transition: border-color 0.2s;
}
.form-input:focus { border-color: var(--primary); outline: none; }

/* ---- Btn primary ---- */
.btn-primary {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    background: var(--primary);
    color: white;
    font-weight: 600;
    padding: 10px 22px;
    border-radius: 9999px;
    border: none;
    cursor: pointer;
    transition: background 0.2s;
    font-size: 0.9rem;
}
.btn-primary:hover { background: var(--primary-dark); }

/* ---- Admin / Agent sidebar ---- */
.sidebar {
    width: 240px;
    min-height: 100vh;
    background: #1E1E2E;
    color: #cdd6f4;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0;
    z-index: 100;
    transition: transform 0.3s ease;
}
.sidebar.closed { transform: translateX(-100%); }
.sidebar-logo {
    padding: 24px 20px;
    font-size: 1.2rem;
    font-weight: 800;
    color: #f38ba8;
    border-bottom: 1px solid #313244;
}
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    font-size: 0.88rem;
    color: #a6adc8;
    transition: background 0.15s, color 0.15s;
}
.sidebar-nav a:hover, .sidebar-nav a.active {
    background: #313244;
    color: #cba6f7;
}
.sidebar-nav a i { width: 18px; text-align: center; }

.main-with-sidebar {
    margin-left: 240px;
    min-height: 100vh;
    background: #F9FAFB;
}
@media (max-width: 768px) {
    .sidebar { transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    .main-with-sidebar { margin-left: 0; }
}

/* ---- Image upload drop zone ---- */
.drop-zone {
    border: 2px dashed #D1D5DB;
    border-radius: var(--radius);
    padding: 40px;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
}
.drop-zone.drag-over { border-color: var(--primary); background: #FFF5F7; }

/* ---- Calendar ---- */
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.cal-day {
    aspect-ratio: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    font-size: 0.82rem;
    cursor: pointer;
    transition: background 0.15s;
}
.cal-day:hover { background: #f3f4f6; }
.cal-day.today { background: #FFF5F7; color: var(--primary); font-weight: 700; }
.cal-day.booked { background: #FEE2E2; color: #9CA3AF; cursor: not-allowed; text-decoration: line-through; }
.cal-day.blocked { background: #E5E7EB; color: #9CA3AF; cursor: not-allowed; }
.cal-day.selected { background: var(--primary); color: white; }
.cal-day.in-range { background: #FFE4E8; color: var(--primary); }

/* ---- Image carousel (listing detail) ---- */
.carousel { position: relative; overflow: hidden; border-radius: var(--radius); }
.carousel-track { display: flex; transition: transform 0.35s ease; }
.carousel-track img { min-width: 100%; height: 380px; object-fit: cover; }
.carousel-btn {
    position: absolute; top: 50%; transform: translateY(-50%);
    background: white; border: none; width: 36px; height: 36px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    cursor: pointer; box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    transition: transform 0.15s;
}
.carousel-btn:hover { transform: translateY(-50%) scale(1.1); }
.carousel-btn.prev { left: 12px; }
.carousel-btn.next { right: 12px; }

/* ---- Amenity pill ---- */
.amenity-pill {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid #E5E7EB;
    border-radius: 9999px;
    font-size: 0.8rem;
    color: #374151;
}

/* ---- Star rating inputs ---- */
.star-input input[type=radio] { display: none; }
.star-input label { cursor: pointer; font-size: 1.5rem; color: #D1D5DB; transition: color 0.15s; }
.star-input label:hover,
.star-input label:hover ~ label,
.star-input input:checked ~ label { color: #FBBF24; }

/* ---- Safe area (iOS) ---- */
.safe-area-bottom { padding-bottom: env(safe-area-inset-bottom, 0); }

/* ---- Range slider ---- */
input[type=range] { accent-color: var(--primary); }

/* ---- Pagination ---- */
.pagination { display: flex; gap: 4px; flex-wrap: wrap; }
.pagination a, .pagination span {
    padding: 6px 12px;
    border-radius: 8px;
    font-size: 0.85rem;
    border: 1px solid #E5E7EB;
    color: #374151;
    transition: all 0.15s;
}
.pagination a:hover { border-color: var(--primary); color: var(--primary); }
.pagination .active { background: var(--primary); color: white; border-color: var(--primary); }

/* ---- Responsive helpers ---- */
.hide-mobile { display: block; }
.show-mobile { display: none; }
@media (max-width: 640px) {
    .hide-mobile { display: none; }
    .show-mobile { display: block; }
}
