/* =========================================================
   Base
   ========================================================= */

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Helvetica,
        Arial,
        sans-serif;
    background: #f5f7fa;
    color: #1f2937;
}

button,
input,
select {
    font: inherit;
}

button {
    cursor: pointer;
}

.app {
    min-height: 100vh;
}


/* =========================================================
   Common Form Controls
   ========================================================= */

input,
select {
    outline: none;
}

input:focus,
select:focus {
    border-color: #9ca3af;
}


/* =========================================================
   Status
   ========================================================= */

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    margin-top: 10px;
    padding: 4px 9px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
}

.status-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}

/* Available */

.status-available {
    background: #ecfdf5;
    color: #047857;
}

.status-available .status-dot {
    background: #10b981;
}

/* Reserved */

.status-reserved {
    background: #fffbeb;
    color: #b45309;
}

.status-reserved .status-dot {
    background: #f59e0b;
}

/* Non-Available */

.status-non-available {
    background: #f3f4f6;
    color: #6b7280;
}

.status-non-available .status-dot {
    background: #9ca3af;
}


/* =========================================================
   Tags
   ========================================================= */

.tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 10px;
}

.tag {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 12px;
    background: #eef1f5;
    color: #5b6470;
    font-size: 12px;
    line-height: 1.2;
}

.tag.clickable {
    cursor: pointer;
}

.tag.clickable:hover {
    background: #e2e6eb;
}


/* =========================================================
   Gallery
   ========================================================= */

.gallery {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 15px;
}

.main-image {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: #f3f4f6;
    border-radius: 7px;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    cursor: zoom-in;
}

.main-image img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}


/* =========================================================
   Gallery Controls
   ========================================================= */

.gallery-controls {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 12px;
    color: #6b7280;
    font-size: 13px;
}

.gallery-controls button {
    border: 1px solid #d1d5db;
    background: #ffffff;
    color: #374151;
    border-radius: 6px;
    padding: 7px 12px;
    transition: background 0.15s ease;
}

.gallery-controls button:hover {
    background: #f3f4f6;
}


/* =========================================================
   Gallery Thumbnails
   ========================================================= */

.gallery-thumbnails {
    display: flex;
    gap: 8px;
    margin-top: 12px;
    overflow-x: auto;
    padding-bottom: 2px;
}

.gallery-thumbnail {
    width: 72px;
    height: 55px;
    flex-shrink: 0;
    border: 2px solid transparent;
    border-radius: 6px;
    overflow: hidden;
    cursor: pointer;
    background: #f3f4f6;
}

.gallery-thumbnail.active {
    border-color: #6b7280;
}

.gallery-thumbnail:hover {
    border-color: #9ca3af;
}

.gallery-thumbnail img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}


/* =========================================================
   Fullscreen Viewer
   ========================================================= */

.viewer {
    position: fixed;
    inset: 0;
    z-index: 1000;
    background: rgba(0, 0, 0, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
}

.viewer img {
    max-width: 90vw;
    max-height: 90vh;
    object-fit: contain;
}

.viewer-close {
    position: absolute;
    top: 18px;
    right: 24px;
    width: 42px;
    height: 42px;
    border: none;
    background: transparent;
    color: #ffffff;
    font-size: 32px;
    cursor: pointer;
}

.viewer-prev,
.viewer-next {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 46px;
    height: 46px;
    border: none;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.14);
    color: #ffffff;
    font-size: 27px;
    cursor: pointer;
}

.viewer-prev {
    left: 20px;
}

.viewer-next {
    right: 20px;
}

.viewer-prev:hover,
.viewer-next:hover {
    background: rgba(255, 255, 255, 0.24);
}


/* =========================================================
   Common Error Message
   ========================================================= */

.error {
    background: #ffffff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 25px;
    color: #b91c1c;
}