/* ===== Variables ===== */
:root {
    /* Colors */
    --bg-main: #071226;
    --text-main: #e2e8f0;
    --text-white: #ffffff;
    --text-muted: #7c8aa5;
    --text-soft: #94a3b8;
    --text-dim: #64748b;

    --border-strong: rgba(208, 229, 255, 0.2);

    --card-bg: rgba(17, 24, 38, 1);
    --header-bg: rgba(11, 18, 32, 1);

    --hover-bg: rgba(255, 255, 255, 0.02);

    --green: rgba(20, 197, 101, 1);
    --green-bg: rgba(20, 197, 101, 0.3);

    --orange: #fb923c;
    --orange-bg: rgba(251, 146, 60, 0.15);

    --red: #ef4444;
    --red-bg: rgba(239, 68, 68, 0.15);

    --primary: rgba(95, 92, 230, 1);
    --primary-shadow: rgba(99, 102, 241, 0.35);

    /* Spacing */
    --radius-sm: 10px;
    --radius-md: 14px;

    --font-xs: 10px;
    --font-sm: 12px;
    --font-base: 13px;
    --font-md: 14px;
    --font-lg: 16px;
    --font-xl: 22px;

    --transition-fast: 0.2s;
}

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

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Inter", sans-serif;
    background: var(--bg-main);
    color: var(--text-main);
    -webkit-font-smoothing: antialiased;
}

/* ===== Layout ===== */

.page {
    max-width: 1100px;
    margin: 40px auto;
    padding: 0 20px;
}

/* ===== Topbar ===== */

.topbar {
    margin: 0px 20px 20px 20px;
}

.logo {
    font-size: var(--font-xl);
    font-weight: 600;
    color: var(--text-white);
}

.logo span {
    display: block;
    font-size: var(--font-base);
    color: var(--text-soft);
    margin-top: 4px;
}

.controls-wrapper {
    display: flex;
    justify-content: flex-end;
    margin-top: 24px;
}

.controls {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: var(--font-base);
}

.sort-label {
    color: var(--text-dim);
    text-transform: uppercase;
}

.controls a {
    text-decoration: underline;
    color: #cbd5e1;
    font-weight: 500;
}

.controls a:hover {
    color: var(--text-white);
}

/* ===== Card ===== */

.card {
    background: var(--card-bg) !important;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-strong);
}

/* ===== Table ===== */

.table-wrapper {
    overflow: hidden;
    border-radius: var(--radius-md);
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

.table th {
    text-align: left;
    font-size: var(--font-md);
    color: var(--text-muted);
    padding: 10px;
    font-weight: 500;
    background: var(--header-bg) !important;
    height: 70px;
}

.table td {
    padding: 22px 10px;
    border-top: 1px solid var(--border-strong);
    font-size: var(--font-md);
}

.table tr:hover {
    background: var(--hover-bg);
}

/* ===== Hotel cell ===== */

.hotel-name {
    font-weight: 600;
    color: var(--text-white);
    font-size: var(--font-lg);
}

.hotel-area {
    font-size: var(--font-sm);
    color: var(--text-muted);
    margin-top: 6px;
}

/* ===== Price ===== */

.baseline {
    color: var(--text-dim);
}

.price-wrapper {
    font-weight: 500;
    color: var(--text-white);
    font-size: var(--font-lg);
}

/* ===== Change pills ===== */

.change {
    padding: 4px 6px;
    font-weight: 600;
    font-size: var(--font-base);
}

.change.strong {
    background: var(--green-bg) !important;
    color: var(--green) !important;
}

.change.medium {
    background: var(--orange-bg);
    color: var(--orange);
}

.change.growth {
    background: var(--red-bg);
    color: var(--red);
}

.pill {
    display: block;
    border-radius: var(--radius-md);
    width: 65px;
    text-align: center;
}

/* ===== Updated ===== */

.updated {
    color: var(--text-muted);
    font-size: var(--font-base);
}

/* ===== Flag ===== */

.flag {
    font-size: var(--font-lg);
}

/* ===== Button ===== */

td:last-child {
    width: 0px;
}

.book-btn {
    background: var(--primary) !important;
    color: var(--text-white) !important;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-size: var(--font-lg);
    font-weight: 600;
    text-decoration: none;
    transition: var(--transition-fast);
}

.book-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px var(--primary-shadow);
}

/* ===== Credits ===== */
.credits {
    display: flex;
    align-items: flex-start;
    flex-direction: column;
    font-style: italic;
    font-size: var(--font-md);
    color: var(--text-dim);
    margin: 20px 0px 0px 20px;
}

.credits a {
    text-decoration: underline;
    color: var(--text-dim);
    font-weight: 500;
}

.credits a:hover {
    font-style: italic;
    color: var(--text-white);
}

.credits-inner {
    display: flex;
}

/* ===== Mobile display ===== */

.updated-mobile,
.baseline-mobile {
    display: none !important;
}

/* ===== Mobile styles ===== */

@media (max-width: 640px) {

    .hotel-name {
        white-space: nowrap !important;
        overflow: hidden !important;
        text-overflow: ellipsis !important;
        max-width: 120px;
        display: block;
    }

    th:nth-child(2),
    td:nth-child(2),
    th:nth-child(5),
    td.updated,
    th:nth-child(6),
    td.flag,
    td.baseline {
        display: none !important;
    }

    td .updated {
        display: block !important;
        font-size: var(--font-sm);
        color: #9ba3b4;
        margin-top: 5px;
    }

    td.price {
        display: flex;
        flex-direction: column;
    }

    .table td {
        padding: 14px 8px;
    }

    .table thead {
        font-size: var(--font-sm);
    }

    .book-btn {
        padding: 10px 16px;
        border-radius: 12px;
    }

    .change-wrapper {
        display: flex;
        flex-direction: column;
        align-items: flex-start;
        gap: 4px;
    }

    .updated-mobile,
    .baseline-mobile {
        display: block !important;
        margin-top: 4px;
        color: rgba(112, 123, 136, 1);
        font-size: 10px !important;
        font-weight: 200;
    }

    .change-alignment {
        display: flex;
        flex-direction: column;
        align-items: center;
    }

    .baseline-mobile {
        padding-top: 4px;
    }
}