/* ============================================================
   TERMIN-POPUP CSS – FachTap Gold/Schwarz Stil
   ============================================================ */

   #terminPopup {
    display: none;
    position: fixed;
    inset: 0;
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 16px;
    box-sizing: border-box;
  }
  #terminPopup.tp-show { display: flex; }
  
  .tp-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0,0,0,0.78);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
  }
  
  .tp-card {
    position: relative;
    width: 100%;
    max-width: 380px;
    max-height: 90vh;
    overflow-y: auto;
    background: linear-gradient(160deg, #0f0e0a 0%, #161410 60%, #1a1710 100%);
    border: 1px solid rgba(212,160,23,0.22);
    border-radius: 28px;
    padding: 28px 22px 24px;
    box-shadow: 0 40px 100px rgba(0,0,0,0.7),
                0 0 0 1px rgba(212,160,23,0.08),
                inset 0 1px 0 rgba(212,160,23,0.07);
    animation: tpEnter 0.4s cubic-bezier(0.34,1.56,0.64,1) forwards;
    scrollbar-width: thin;
    scrollbar-color: rgba(212,160,23,0.2) transparent;
  }
  .tp-card::-webkit-scrollbar { width: 4px; }
  .tp-card::-webkit-scrollbar-thumb { background: rgba(212,160,23,0.2); border-radius: 4px; }
  
  .tp-card::before {
    content: '';
    position: absolute;
    top: 0; left: 20%; right: 20%; height: 1px;
    background: linear-gradient(90deg, transparent, #D4A017, #ffe066, #D4A017, transparent);
  }
  
  @keyframes tpEnter {
    from { opacity:0; transform:scale(0.88) translateY(24px); }
    to   { opacity:1; transform:scale(1) translateY(0); }
  }
  
  /* ── Close ── */
  .tp-close {
    position: absolute; top:14px; right:14px;
    width:30px; height:30px;
    background: rgba(212,160,23,0.07);
    border: 1px solid rgba(212,160,23,0.18);
    border-radius: 50%;
    color: rgba(212,160,23,0.6);
    cursor: pointer;
    display: flex; align-items:center; justify-content:center;
    transition: background 0.2s, color 0.2s;
    z-index: 2;
  }
  .tp-close:hover { background: rgba(212,160,23,0.18); color: goldenrod; }
  
  /* ── Header ── */
  .tp-header { text-align:center; margin-bottom:14px; }
  .tp-header-icon {
    font-size:28px; margin-bottom:6px;
    filter: drop-shadow(0 0 12px rgba(212,160,23,0.4));
  }
  .tp-title {
    font-family: 'Cormorant Garamond', 'Georgia', serif;
    font-size:20px; font-weight:600; color:#f5e6b8;
    margin:0 0 4px; letter-spacing:0.3px;
  }
  .tp-subtitle {
    font-size:12px; color:rgba(255,255,255,0.32);
    margin:0; font-family:'DM Sans',sans-serif;
  }
  
  /* ── Legende ── */
  .tp-legend {
    display: flex; gap:14px; justify-content:center;
    margin-bottom:14px;
  }
  .tp-legend-item {
    display:flex; align-items:center; gap:5px;
    font-size:11px; color:rgba(255,255,255,0.4);
    font-family:'DM Sans',sans-serif;
  }
  .tp-legend-dot {
    width:9px; height:9px; border-radius:50%;
  }
  .tp-legend-dot--frei      { background: rgba(80,200,120,0.8); }
  .tp-legend-dot--angefragt { background: rgba(212,160,23,0.9); }
  .tp-legend-dot--belegt    { background: rgba(220,70,70,0.8);  }
  
  /* ── Kalender ── */
  .tp-calendar {
    background: rgba(255,255,255,0.025);
    border: 1px solid rgba(212,160,23,0.1);
    border-radius:18px; padding:14px; margin-bottom:16px;
  }
  
  .tp-cal-nav {
    display:flex; align-items:center;
    justify-content:space-between; margin-bottom:12px;
  }
  .tp-cal-btn {
    background: rgba(212,160,23,0.08);
    border: 1px solid rgba(212,160,23,0.2);
    border-radius:8px; color:goldenrod;
    width:28px; height:28px; font-size:16px;
    cursor:pointer; display:flex; align-items:center; justify-content:center;
    transition: background 0.2s; line-height:1;
  }
  .tp-cal-btn:hover { background: rgba(212,160,23,0.18); }
  
  .tp-cal-month {
    font-family:'Cormorant Garamond',serif;
    font-size:15px; font-weight:600; color:#f5e6b8; letter-spacing:0.5px;
  }
  
  .tp-cal-weekdays {
    display:grid; grid-template-columns:repeat(7,1fr);
    gap:2px; margin-bottom:6px;
  }
  .tp-cal-weekdays span {
    text-align:center; font-size:10px;
    color:rgba(212,160,23,0.35);
    font-family:'DM Sans',sans-serif; font-weight:500;
  }
  
  .tp-cal-grid {
    display:grid; grid-template-columns:repeat(7,1fr); gap:3px;
  }
  
  .tp-day {
    aspect-ratio:1;
    display:flex; align-items:center; justify-content:center;
    font-size:12px; font-family:'DM Sans',sans-serif;
    border-radius:8px; transition: all 0.15s;
    cursor:default; position:relative; border:1px solid transparent;
  }
  
  .tp-day--empty    { background:transparent; }
  .tp-day--disabled { color:rgba(255,255,255,0.12); }
  
  /* 🟢 Grün = frei */
  .tp-day--frei {
    color: rgba(80,200,120,0.9);
    background: rgba(80,200,120,0.07);
    border-color: rgba(80,200,120,0.18);
    cursor:pointer; font-weight:500;
  }
  .tp-day--frei:hover {
    background: rgba(80,200,120,0.16);
    border-color: rgba(80,200,120,0.35);
    transform:scale(1.08);
  }
  
  /* 🟡 Gold = angefragt */
  .tp-day--angefragt {
    color: rgba(212,160,23,0.95);
    background: rgba(212,160,23,0.1);
    border-color: rgba(212,160,23,0.3);
    cursor:pointer; font-weight:500;
  }
  .tp-day--angefragt:hover {
    background: rgba(212,160,23,0.18);
    border-color: rgba(212,160,23,0.5);
    transform:scale(1.08);
  }
  
  /* 🔴 Rot = bestätigt/voll */
  .tp-day--voll {
    color: rgba(220,70,70,0.7);
    background: rgba(220,70,70,0.07);
    border-color: rgba(220,70,70,0.15);
    cursor:not-allowed;
  }
  
  /* Ausgewählt */
  .tp-day--selected {
    background: rgba(212,160,23,0.2) !important;
    border-color: rgba(212,160,23,0.55) !important;
    color: goldenrod !important;
    box-shadow: 0 0 10px rgba(212,160,23,0.2);
  }
  
  /* Heute */
  .tp-day--today::after {
    content:''; position:absolute; bottom:3px; left:50%;
    transform:translateX(-50%);
    width:4px; height:4px; border-radius:50%;
    background:goldenrod; opacity:0.5;
  }
  
  /* ── Section Label ── */
  .tp-section-label {
    font-size:11px; font-weight:600;
    color:rgba(212,160,23,0.55);
    text-transform:uppercase; letter-spacing:1px;
    font-family:'DM Sans',sans-serif; margin-bottom:10px;
  }
  
  /* ── Zeitslots ── */
  .tp-slots-section { margin-bottom:16px; animation:tpFadeIn 0.3s ease; }
  .tp-slots { display:flex; flex-wrap:wrap; gap:8px; }
  
  .tp-slot {
    padding:8px 14px; border-radius:10px;
    font-size:13px; font-weight:500;
    font-family:'DM Sans',sans-serif;
    cursor:pointer; transition:all 0.15s;
    border:1px solid transparent;
  }
  
  /* 🟢 Frei */
  .tp-slot--frei {
    background: rgba(80,200,120,0.07);
    border-color: rgba(80,200,120,0.25);
    color: rgba(80,200,120,0.9);
  }
  .tp-slot--frei:hover {
    background: rgba(80,200,120,0.15);
    border-color: rgba(80,200,120,0.45);
    transform:translateY(-1px);
  }
  .tp-slot--frei.tp-slot--active,
  .tp-slot--angefragt.tp-slot--active {
    background: rgba(212,160,23,0.15);
    border-color: rgba(212,160,23,0.5);
    color: goldenrod;
    box-shadow: 0 0 12px rgba(212,160,23,0.15);
  }
  
  /* 🟡 Angefragt */
  .tp-slot--angefragt {
    background: rgba(212,160,23,0.08);
    border-color: rgba(212,160,23,0.3);
    color: rgba(212,160,23,0.8);
  }
  .tp-slot--angefragt:hover {
    background: rgba(212,160,23,0.15);
    border-color: rgba(212,160,23,0.5);
  }
  
  /* 🔴 Belegt */
  .tp-slot--belegt {
    background: rgba(220,70,70,0.05);
    border-color: rgba(220,70,70,0.15);
    color: rgba(220,70,70,0.4);
    cursor:not-allowed; text-decoration:line-through;
  }
  
  /* ── Terminart ── */
  .tp-art-section { margin-bottom:16px; animation:tpFadeIn 0.3s ease; }
  .tp-art-row { display:flex; gap:10px; }
  
  .tp-art-card {
    flex:1; padding:12px 10px;
    background: rgba(255,255,255,0.025);
    border:1px solid rgba(212,160,23,0.14);
    border-radius:14px; cursor:pointer;
    transition:all 0.2s;
    display:flex; flex-direction:column; align-items:center; gap:6px;
  }
  .tp-art-card:hover {
    background: rgba(212,160,23,0.06);
    border-color: rgba(212,160,23,0.28);
  }
  .tp-art-card--active {
    background: rgba(212,160,23,0.12) !important;
    border-color: rgba(212,160,23,0.5) !important;
    box-shadow: 0 0 16px rgba(212,160,23,0.12);
  }
  .tp-art-icon { font-size:20px; }
  .tp-art-text {
    font-size:12px; font-family:'DM Sans',sans-serif;
    color:rgba(255,255,255,0.65); font-weight:500;
  }
  .tp-art-card--active .tp-art-text { color:goldenrod; }
  
  /* ── Felder ── */
  .tp-fields-section { margin-bottom:16px; animation:tpFadeIn 0.3s ease; }
  .tp-field-group { margin-bottom:12px; }
  .tp-field-group:last-child { margin-bottom:0; }
  
  .tp-input {
    width:100%; padding:11px 14px;
    background: rgba(255,255,255,0.04);
    border:1.5px solid rgba(212,160,23,0.2);
    border-radius:12px; color:#f5e6b8;
    font-size:13px; font-family:'DM Sans',sans-serif;
    outline:none; box-sizing:border-box;
    transition: border-color 0.2s, box-shadow 0.2s;
  }
  .tp-input:focus {
    border-color: rgba(212,160,23,0.5);
    box-shadow: 0 0 0 3px rgba(212,160,23,0.1);
  }
  .tp-input::placeholder { color:rgba(255,255,255,0.2); }
  
  /* ── Footer ── */
  .tp-footer { animation:tpFadeIn 0.3s ease; }
  .tp-ics-hint {
    font-size:10px; color:rgba(255,255,255,0.22);
    text-align:center; font-family:'DM Sans',sans-serif;
    margin:0 0 12px; line-height:1.5;
  }
  
  .tp-submit {
    width:100%; padding:14px 20px;
    background: linear-gradient(135deg, #D4A017 0%, #b8860b 50%, #D4A017 100%);
    background-size:200% 200%;
    color:#0a0800; border:none; border-radius:14px;
    cursor:pointer; font-size:14px;
    font-family:'DM Sans',sans-serif; font-weight:700;
    letter-spacing:0.5px;
    transition: box-shadow 0.2s, transform 0.1s, background-position 0.4s;
    box-shadow: 0 6px 24px rgba(212,160,23,0.3);
  }
  .tp-submit:hover {
    box-shadow:0 8px 32px rgba(212,160,23,0.5);
    background-position:right center; transform:translateY(-1px);
  }
  .tp-submit:active { transform:translateY(0); }
  .tp-submit:disabled { opacity:0.5; cursor:not-allowed; transform:none; }
  
  /* ── Erfolg ── */
  .tp-success {
    position:absolute; inset:0;
    background:linear-gradient(160deg, #0f0e0a, #161410);
    border-radius:28px;
    flex-direction:column; align-items:center; justify-content:center;
    gap:12px; text-align:center; padding:40px 28px;
    animation:tpEnter 0.4s cubic-bezier(0.34,1.56,0.64,1);
    z-index:5;
  }
  .tp-success-icon {
    font-size:52px;
    animation:tpBounce 0.6s cubic-bezier(0.34,1.56,0.64,1) 0.1s both;
    filter:drop-shadow(0 0 20px rgba(212,160,23,0.5));
  }
  @keyframes tpBounce {
    0%   { transform:scale(0) rotate(-15deg); }
    70%  { transform:scale(1.2) rotate(5deg); }
    100% { transform:scale(1) rotate(0); }
  }
  .tp-success h3 {
    font-family:'Cormorant Garamond',serif;
    font-size:22px; font-weight:700; color:#f5e6b8; margin:0;
  }
  .tp-success p {
    font-size:13px; color:rgba(255,255,255,0.42);
    font-family:'DM Sans',sans-serif; margin:0; line-height:1.6;
  }
  .tp-success-close {
    margin-top:8px; padding:10px 28px;
    background:rgba(212,160,23,0.1);
    border:1px solid rgba(212,160,23,0.3);
    border-radius:12px; color:goldenrod;
    font-size:13px; font-family:'DM Sans',sans-serif;
    cursor:pointer; transition:background 0.2s;
  }
  .tp-success-close:hover { background:rgba(212,160,23,0.2); }
  
  @keyframes tpFadeIn {
    from { opacity:0; transform:translateY(8px); }
    to   { opacity:1; transform:translateY(0); }
  }