/* Stylesheet for Mallorca 2026 men's trip website */

@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;600;700&display=swap');

/*
 * Base styling with a dark, futuristic theme. Colours are chosen for good
 * contrast and readability on both desktop and mobile devices. Tables
 * become horizontally scrollable on small screens.
 */

body {
  overflow-x: hidden;

    margin: 0;
    padding: 0;
    font-family: 'Poppins', sans-serif;
    background: #0b1526;
    color: #e4e7ef;
    line-height: 1.6;
}


/* Make sizing predictable and prevent accidental horizontal scrolling on mobile */
*, *::before, *::after { box-sizing: border-box; }
html, body {
  overflow-x: hidden;
 max-width: 100%; overflow-x: hidden; }
/* Hero section with overlay; the image is supplied via the style attribute */
.hero {
    position: relative;
    height: 280px;
    background-size: cover;
    background-position: center;
    overflow: hidden;
}

/* Smaller hero variant used on sub-pages (e.g. Kosten-Eingabe) */
.hero.hero-small {
    height: 200px;
}

.hero.hero-small .hero-content {
    padding-top: 55px;
}

/* Semi‑transparent overlay to improve text contrast */
.hero::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
}

.hero-content {
    position: relative;
    z-index: 1;
    text-align: center;
    color: #fff;
    padding-top: 80px;
}

.hero-content h1 {
    font-size: 2.2rem;
    margin: 0;
}

.hero-content p {
    font-size: 1rem;
    margin-top: 8px;
    opacity: 0.85;
}

/* Container holds the main content. On pages with hero, the top margin is
 * negative to overlap with the hero; on other pages we override with
 * body.no-hero .container in the CSS below.
 */
.container {
    width: 92%;
    max-width: 1100px;
    margin: -60px auto 40px;
    background: rgba(12, 24, 44, 0.85);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
    border-radius: 12px;
    padding: 30px 25px 40px;
}

body.no-hero .container {
    margin: 40px auto 40px;
    padding: 25px 20px 35px;
}

/* Section headings */
h2 {
    text-align: center;
    margin-top: 10px;
    margin-bottom: 20px;
    color: #ff8c42;
    font-weight: 600;
}

/* Trip information text uses pre-line to honour newlines */
/* Trip information text uses pre-line to honour newlines */
.trip-text {
    white-space: pre-line;
    margin-bottom: 20px;
}

/* New info sections (Start, Flüge, Hotel, Kosten, Programm) */
.info-sections {
    margin-bottom: 30px;
}
.info-section {
    margin-bottom: 18px;
}
.info-section h3 {
    margin: 0 0 6px 0;
    font-size: 1.25rem;
    font-weight: 600;
    color: #ff8c42;
}
.info-section .info-text {
    white-space: pre-line;
    line-height: 1.45;
    font-size: 0.95rem;
}

@media (max-width: 600px) {
    .info-section h3 {
        font-size: 1.1rem;
    }
    .info-section .info-text {
        font-size: 0.9rem;
        line-height: 1.4;
    }
}

/* Responsive table wrapper */
.table-responsive {
    width: 100%;
    overflow-x: auto;
}

/* Participant table styling */
.participant-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 620px;
    margin-bottom: 20px;
}
.participant-table th,
.participant-table td {
    padding: 12px 8px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 0.95rem;
}

/* Allow long participant / split lists to wrap instead of forcing horizontal scroll */
.participant-table td {
    white-space: normal;
    word-break: break-word;
    vertical-align: top;
}
.participant-table th {
    background: #16243a;
    color: #ffcc95;
    font-weight: 600;
}
.participant-table tr:nth-child(odd) {
    background: #0f1f36;
}
.participant-table tr:nth-child(even) {
    background: #13284a;
}

/* Smaller action button inside the name cell */
.action-link .button {
    font-size: 0.8rem;
    padding: 6px 10px;
}

/* Status colours */
.status-open {
    color: #e74c3c;
    font-weight: 600;
}
.status-submitted {
    color: #2ecc71;
    font-weight: 600;
}
.status-paid {
    color: #1abc9c;
    font-weight: 600;
}
.status-unpaid {
    color: #e67e22;
    font-weight: 600;
}

/* Room pairing status colours */
.room-status-confirmed {
    color: #2ecc71;
    font-weight: 600;
}
.room-status-pending {
    color: #e67e22;
    font-weight: 600;
}
.room-status-unpaired {
    color: #95a5a6;
    font-weight: 600;
}

/* Room list styling */
.rooms-list {
    list-style: none;
    padding-left: 0;
    margin-top: 15px;
}

.rooms-list li {
    margin-bottom: 8px;
    font-size: 0.95rem;
}

/* Buttons */
a.button,
form input[type="submit"] {
    display: inline-block;
    padding: 9px 16px;
    background: #ff8c42;
    color: #fff;
    text-decoration: none;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    transition: background 0.2s ease;
}
a.button:hover,
form input[type="submit"]:hover {
    background: #e07634;
}

/* Extra button styles used by the Kosten wizard */
button.primary,
a.button.primary {
    background: #ff8c42;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 12px 14px;
    font-weight: 700;
}
button.primary:hover,
a.button.primary:hover {
    background: #e07634;
}

button.ghost {
    background: transparent;
    border: 1px solid rgba(255,255,255,0.18);
    color: #e4e7ef;
    border-radius: 6px;
    padding: 12px 14px;
    font-weight: 600;
}
button.ghost:hover {
    border-color: rgba(255,255,255,0.32);
}

button.danger {
    background: rgba(231, 76, 60, 0.18);
    border: 1px solid rgba(231, 76, 60, 0.4);
    color: #ffd6d0;
    border-radius: 10px;
}

/* ------------------------------
   Kosten – Mobile UX (Wizard + Keypad)
------------------------------- */

.expense-wizard {
    display: block;
    margin-top: 10px;
}

.step-pills {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin: 10px 0 14px;
}

.step-pill {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.12);
    color: #e4e7ef;
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 600;
    cursor: pointer;
}

.step-pill.is-active {
    border-color: rgba(255, 140, 66, 0.7);
    background: rgba(255, 140, 66, 0.14);
    color: #ffcc95;
}

.wizard-step {
    display: none;
    padding: 10px 0;
}

.wizard-step.is-active {
    display: block;
}

/* Minimal top bar (used e.g. on the expense wizard) */
.topbar {
    background: rgba(10, 18, 34, 0.92);
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    position: sticky;
    top: 0;
    z-index: 50;
    backdrop-filter: blur(8px);
}
.topbar-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
}
.topbar-title {
    font-size: 16px;
    font-weight: 800;
    letter-spacing: 0.2px;
}
.topbar-links {
    display: flex;
    gap: 10px;
}
.topbar-links a {
    color: rgba(255, 255, 255, 0.86);
    text-decoration: none;
    font-weight: 700;
    padding: 8px 10px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.10);
    background: rgba(255, 255, 255, 0.04);
}
.topbar-links a:active {
    transform: scale(0.98);
}

/* Make the expense wizard feel like an app on mobile */
.wizard-full .section {
    padding-top: 18px;
}
.wizard-full .wizard-shell {
    min-height: calc(100vh - 70px);
}
.wizard-full .wizard-step {
    padding: 14px 0;
}
.wizard-full .wizard-nav {
    position: sticky;
    bottom: 0;
    background: rgba(10, 18, 34, 0.92);
    padding: 12px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(8px);
}

/* Step pills */
.wizard-steps {
    display: flex;
    gap: 10px;
    overflow-x: auto;
    padding: 6px 2px 10px 2px;
    scrollbar-width: none;
}
.wizard-steps::-webkit-scrollbar { display: none; }
.wizard-step-btn {
    flex: 0 0 auto;
    white-space: nowrap;
}

.wizard-nav {
    display: flex;
    gap: 10px;
    justify-content: space-between;
}

.wizard-nav button {
    flex: 1;
}

.amount-display {
    width: 100%;
    background: #0f2137;
    border: 1px solid #2c3e50;
    border-radius: 10px;
    padding: 14px 16px;
    font-size: 2.2rem;
    font-weight: 800;
    text-align: right;
    letter-spacing: 0.5px;
    margin-bottom: 10px;

    width: 100%;
    min-width: 0;
}

.quick-add {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 12px;
}

.chip {
    background: rgba(255,255,255,0.06);
    border: 1px solid rgba(255,255,255,0.14);
    color: #e4e7ef;
    border-radius: 999px;
    padding: 8px 12px;
    font-weight: 700;
}

.chip:hover {
    border-color: rgba(255,255,255,0.28);
}

.keypad {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 10px;
    margin-top: 10px;
}

.keypad button {
    padding: 16px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.14);
    background: rgba(255,255,255,0.06);
    color: #e4e7ef;
    font-size: 1.35rem;
    font-weight: 800;
}

.keypad button.primary {
    grid-column: span 2;
    font-size: 1.15rem;
}

.split-help {
    font-size: 0.9rem;
    opacity: 0.9;
    margin-top: -6px;
    margin-bottom: 12px;
}

.split-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
    margin-bottom: 12px;
}

@media (max-width: 420px) {
    .split-grid {
        grid-template-columns: 1fr;
    }
}

.check-chip {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 12px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.12);
    background: rgba(255,255,255,0.05);
}

.check-chip input {
    width: 22px;
    height: 22px;
}

.hint {
    font-size: 0.9rem;
    opacity: 0.85;
    margin-top: 12px;
}

/* ------------------------------
   Kosten – Übersicht (Charts + Cards)
------------------------------- */

.cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 12px;
    margin: 14px 0 18px;
}

@media (max-width: 760px) {
    .cards {
        grid-template-columns: 1fr;
    }
}

.card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 14px;
    padding: 14px 14px;
}

.card-title {
    color: #ffcc95;
    font-weight: 700;
    margin-bottom: 6px;
}

.card-value {
    font-size: 1.35rem;
    font-weight: 800;
}

.chart-card canvas {
    width: 100%;
    height: 150px;
    display: block;
}

.settlement-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
}

@media (max-width: 760px) {
    .settlement-grid {
        grid-template-columns: 1fr;
    }
}

.settlement-item {
    padding: 12px;
    border-radius: 12px;
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.10);
}

.settlement-item strong {
    color: #ffcc95;
}

.expense-cards {
    display: none;
    margin-top: 10px;
}

.expense-card {
    background: rgba(255,255,255,0.05);
    border: 1px solid rgba(255,255,255,0.10);
    border-radius: 14px;
    padding: 12px;
    margin-bottom: 12px;
}

.expense-card-top {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 12px;
    margin-bottom: 8px;
}

.expense-amt {
    font-size: 1.35rem;
    font-weight: 900;
    color: #ffcc95;
}

.expense-meta {
    opacity: 0.85;
    font-size: 0.9rem;
}

.expense-card-row {
    margin-top: 6px;
    line-height: 1.4;
}

@media (max-width: 760px) {
    .kosten-page .expense-cards { display: block; }
    .kosten-page .table-responsive { display: none; }
}

/* Tables: turn into cards on mobile */
@media (max-width: 760px) {
    .participant-table thead {
        display: none;
    }
    .participant-table,
    .participant-table tbody,
    .participant-table tr,
    .participant-table td {
        display: block;
        width: 100%;
    }
    .participant-table tr {
        margin-bottom: 12px;
        border: 1px solid rgba(255,255,255,0.10);
        border-radius: 14px;
        overflow: hidden;
    }
    .participant-table td {
        padding: 10px 12px;
        border-bottom: 1px solid rgba(255,255,255,0.08);
    }
    .participant-table td:last-child {
        border-bottom: none;
    }
    .participant-table td:before {
        content: attr(data-label);
        display: block;
        font-size: 0.78rem;
        text-transform: uppercase;
        letter-spacing: 0.6px;
        opacity: 0.75;
        margin-bottom: 2px;
    }
}


/* Form elements */
form {
    margin-top: 20px;
}
form label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #ffcc95;
}
form input[type="text"],
form input[type="date"],
form input[type="password"],
form select,
form textarea {
    width: 100%;
    padding: 8px;
    margin-bottom: 16px;
    border: 1px solid #2c3e50;
    border-radius: 4px;
    background: #0f2137;
    color: #e4e7ef;
    box-sizing: border-box;
}

/* Success and info messages */
.success {
    background: #1f3a5c;
    border: 1px solid #2d5996;
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
    color: #d4e6f5;
    font-size: 0.9rem;
}

/* Admin link */
.admin-link a {
    color: #ffcc95;
    text-decoration: underline;
    font-weight: 600;
}

/* Login box */
.login-box {
    max-width: 420px;
    margin: 60px auto;
    background: rgba(12, 24, 44, 0.95);
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

.login-box input[type="password"] {
    width: 100%;
    padding: 8px;
    margin-bottom: 12px;
    border: 1px solid #2c3e50;
    border-radius: 4px;
    background: #0f2137;
    color: #e4e7ef;
}

.login-box input[type="submit"] {
    width: 100%;
    padding: 10px;
    background: #ff8c42;
    color: #fff;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: background 0.2s ease;
}
.login-box input[type="submit"]:hover {
    background: #e07634;
}

/* Responsive adjustments */
@media (max-width: 600px) {
    .hero {
        height: 180px;
    }
    .hero-content {
        padding-top: 46px;
        padding-left: 14px;
        padding-right: 14px;
    }
    .hero.hero-small {
        height: 150px;
    }
    .hero.hero-small .hero-content {
        padding-top: 40px;
    }
    .container {
        margin: 20px auto;
        padding: 20px;
    }
    h2 {
        margin-top: 6px;
        margin-bottom: 14px;
        font-size: 1.25rem;
    }
    .participant-table th,
    .participant-table td {
        padding: 10px 6px;
        font-size: 0.85rem;
    }
    .participant-table {
        min-width: 0;
    }
    a.button,
    form input[type="submit"] {
        font-size: 0.9rem;
    }
    .hero-content h1 {
        font-size: 1.6rem;
    }
    .hero-content p {
        font-size: 0.95rem;
        margin-top: 6px;
    }

    /* Expense wizard: keep the keypad chunky on phones */
    .keypad {
        grid-template-columns: repeat(4, 1fr);
        gap: 12px;
    }
    .keypad button {
        padding: 18px 0;
        font-size: 1.25rem;
        min-height: 64px;
    }
    .amount-display {
        font-size: 2.4rem;
    
    width: 100%;
    min-width: 0;
}
}

/* Receipts list styling */
.receipts-list {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 20px;
}
.receipts-list li {
    margin-bottom: 6px;
    font-size: 0.9rem;
}



/* Extra mobile tweaks for the expense wizard (iPhone etc.) */
@media (max-width: 480px) {
  /* iPhone: big, centered amount + big keypad. No horizontal scrolling. */
  .amount-display { padding: 14px 14px; text-align: center; font-size: 3.0rem; }
  .amount-display span { font-size: 3.0rem; }
  .keypad { gap: 10px; }
  .keypad button { min-height: 72px; font-size: 1.5rem; padding: 18px 0; }
  .keypad button.wide { grid-column: span 2; }
  .quick-add button { min-height: 44px; }
  .step-pills { flex-wrap: wrap; }
}

@media (max-width:700px){
  .wizard{padding:14px;}
  .amount-display{padding:14px;}
  .amount-display .amount{font-size:clamp(34px, 10vw, 50px); max-width:100%;}
  .keypad{gap:10px;}
  .key{padding:18px 8px; font-size:20px;}

}


/* Rich text in info blocks */
.info-text a { color: #b58cff; text-decoration: underline; }
.info-text a:visited { opacity: 0.9; }
.rich-img {
  display:block;
  max-width:100%;
  height:auto;
  border-radius:14px;
  margin:10px 0;
  box-shadow: 0 8px 18px rgba(0,0,0,0.25);
}
.hint {
  display:block;
  margin-top:6px;
  opacity:0.8;
  font-size:12px;
}
.hint code{
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  padding: 1px 4px;
  border-radius: 6px;
  background: rgba(255,255,255,0.06);
}
