/* ============================================================
   pf-trainer — Stylesheet v1.0.0
   Gleiche CSS-Variablen und Klassen wie padelfinder.css
   ============================================================ */

:root {
    --pf-blue:        #1a56a0;
    --pf-blue-dark:   #14417a;
    --pf-blue-light:  #e8f0fb;
    --pf-red:         #d9322a;
    --pf-grey-bg:     #f4f5f7;
    --pf-grey-border: #e0e3e8;
    --pf-text:        #1a1f2e;
    --pf-text-muted:  #6b7280;
    --pf-white:       #ffffff;
    --pf-radius:      15px;
    --pf-radius-sm:   10px;
    --pf-shadow:      0 4px 24px rgba(26,86,160,0.10);
    --pf-shadow-sm:   0 2px 8px rgba(0,0,0,0.06);
}

/* ── Registration / Login Wrapper ── */
.pf-reg-wrap {
    min-height: 100vh;
    background: var(--pf-grey-bg);
    display: flex;
    align-items: flex-start;
    justify-content: center;
    padding: 0;
    width: 100%;
    box-sizing: border-box;
}

.pf-reg-card {
    background: var(--pf-white);
    border-radius: 0;
    box-shadow: none;
    width: 100%;
    max-width: 100%;
    padding: 28px 16px 48px;
    box-sizing: border-box;
}

@media (min-width: 600px) {
    .pf-reg-wrap  { padding: 40px 16px 60px; }
    .pf-reg-card  { border-radius: var(--pf-radius); box-shadow: var(--pf-shadow); max-width: 520px; padding: 40px 40px 48px; }
}

/* ── Header ── */
.pf-reg-header { text-align: center; margin-bottom: 32px; }
.pf-reg-header h1 { font-size: 1.75rem; font-weight: 700; color: var(--pf-text); margin: 12px 0 6px; }
.pf-reg-header p  { color: var(--pf-text-muted); font-size: 0.95rem; margin: 0; }

/* ── Step Indicator ── */
.pf-steps-indicator { display: flex; align-items: center; justify-content: center; margin-bottom: 20px; }
.pf-step { display: flex; flex-direction: column; align-items: center; gap: 6px; }
.pf-step-num {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--pf-grey-bg); color: var(--pf-text-muted);
    font-weight: 700; font-size: 0.9rem;
    display: flex; align-items: center; justify-content: center;
    border: 2px solid var(--pf-grey-border); transition: all 0.25s ease;
}
.pf-step-label { font-size: 0.72rem; color: var(--pf-text-muted); font-weight: 500; white-space: nowrap; transition: color 0.25s ease; }
.pf-step--active .pf-step-num  { background: var(--pf-blue); color: var(--pf-white); border-color: var(--pf-blue); }
.pf-step--active .pf-step-label { color: var(--pf-blue); }
.pf-step--done .pf-step-num   { background: var(--pf-blue-light); color: var(--pf-blue); border-color: var(--pf-blue); }
.pf-step-line { flex: 1; height: 2px; background: var(--pf-grey-border); margin: 0 8px 20px; max-width: 60px; transition: background 0.25s ease; }
.pf-step-line--done { background: var(--pf-blue); }
.pf-form-step--hidden { display: none; }
.pf-step-title { font-size: 1.1rem; font-weight: 600; color: var(--pf-text); margin: 0 0 20px; }

/* ── Fields ── */
.pf-field { margin-bottom: 10px; position: relative; }
.pf-field label { display: block; font-size: 0.82rem; font-weight: 600; color: var(--pf-text-muted); margin-bottom: 4px; text-transform: uppercase; letter-spacing: 0.03em; }
.pf-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.pf-field input,
.pf-field select,
.pf-field textarea {
    width: 100%;
    border: none !important;
    border-radius: 999px !important;
    background: var(--pf-grey-bg);
    padding: 0 20px;
    font-size: 0.95rem;
    color: var(--pf-text);
    outline: none;
    transition: box-shadow 0.2s ease, background 0.2s ease;
    box-sizing: border-box;
    font-family: inherit;
    -webkit-appearance: none !important;
    appearance: none !important;
    height: 48px;
}

.pf-field textarea {
    height: auto;
    border-radius: var(--pf-radius-sm) !important;
    padding: 12px 20px;
    resize: vertical;
}

.pf-field select {
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

.pf-field input:focus,
.pf-field select:focus,
.pf-field textarea:focus {
    background: var(--pf-white);
    box-shadow: 0 0 0 2.5px var(--pf-blue);
}

.pf-field input::placeholder,
.pf-field textarea::placeholder { color: #adb5bd; }

.pf-field--password { position: relative; }
.pf-pw-toggle {
    position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; color: var(--pf-text-muted); padding: 4px;
    display: flex; align-items: center;
}
.pf-pw-toggle:hover { color: var(--pf-blue); }

/* ── Errors ── */
.pf-error { display: block; color: var(--pf-red); font-size: 0.8rem; margin-top: 5px; padding-left: 12px; min-height: 1em; }
.pf-error-box {
    background: #fff0f0; border: 1px solid #f5c6c6; border-radius: var(--pf-radius-sm);
    padding: 12px 16px; color: var(--pf-red); font-size: 0.88rem; margin-bottom: 16px;
}

/* ── Buttons ── */
.pf-btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 52px; border-radius: 999px; font-size: 1rem; font-weight: 600;
    border: none; cursor: pointer; transition: all 0.2s ease;
    font-family: inherit; text-decoration: none; padding: 0 28px;
}
.pf-btn--primary  { background: var(--pf-blue); color: var(--pf-white); width: 100%; margin-top: 8px; }
.pf-btn--primary:hover  { background: var(--pf-blue-dark); transform: translateY(-1px); box-shadow: 0 6px 20px rgba(26,86,160,0.25); }
.pf-btn--secondary { background: var(--pf-grey-bg); color: var(--pf-text); border: 1px solid var(--pf-grey-border); }
.pf-btn--secondary:hover { background: var(--pf-grey-border); }
.pf-btn--outline { background: var(--pf-blue-light); color: var(--pf-blue); border: 1px solid rgba(26,86,160,0.2); }
.pf-btn--outline:hover { background: #d4e3f7; }
.pf-btn--danger  { background: #fee2e2; color: var(--pf-red); }
.pf-btn--sm { height: 36px; font-size: 0.85rem; padding: 0 16px; }
.pf-btn--full { width: 100%; }
.pf-btn-row { display: flex; gap: 10px; margin-top: 8px; }
.pf-btn-row .pf-btn--primary { flex: 1; margin-top: 0; }

/* ── Spinner ── */
.pf-spinner { animation: pf-spin 0.8s linear infinite; }
@keyframes pf-spin { to { transform: rotate(360deg); } }

/* ── Summary ── */
.pf-summary-card { background: var(--pf-blue-light); border-radius: var(--pf-radius); padding: 20px 24px; margin-bottom: 20px; }
.pf-summary-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; font-size: 0.95rem; border-bottom: 1px solid rgba(26,86,160,0.1); }
.pf-summary-row:last-of-type { border-bottom: none; }
.pf-summary-row--total { font-size: 1.05rem; margin-top: 4px; padding-top: 12px; border-top: 2px solid rgba(26,86,160,0.15); border-bottom: none; }
.pf-summary-row--total strong { color: var(--pf-blue); font-size: 1.2rem; }
.pf-summary-info { font-size: 0.78rem; color: var(--pf-text-muted); margin: 12px 0 0; }

/* ── Legal / Notice ── */
.pf-legal { text-align: center; font-size: 0.78rem; color: var(--pf-text-muted); margin-top: 16px; }
.pf-legal a { color: var(--pf-blue); text-decoration: underline; }
.pf-notice { background: var(--pf-blue-light); border-radius: var(--pf-radius-sm); padding: 16px 20px; color: var(--pf-text); font-size: 0.95rem; }
.pf-notice a { color: var(--pf-blue); font-weight: 600; }

/* ── Badge ── */
.pf-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 0.75rem; font-weight: 600; }
.pf-badge--active   { background: #d1fae5; color: #065f46; }
.pf-badge--inactive { background: #fee2e2; color: #991b1b; }
.pf-badge--pending  { background: #fef3c7; color: #92400e; }

/* ── Dashboard ── */
.pf-dash-wrap { width: 100%; max-width: 100%; padding: 12px; box-sizing: border-box; overflow-x: hidden; }
.pf-dash-header {
    display: flex; align-items: center; gap: 12px;
    background: var(--pf-white); border-radius: var(--pf-radius); padding: 16px 20px;
    margin-bottom: 12px; box-shadow: var(--pf-shadow-sm); flex-wrap: wrap;
}
.pf-dash-header-info { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.pf-dash-logo-preview { flex-shrink: 0; }
.pf-dash-logo-placeholder {
    width: 56px; height: 56px; border-radius: 50%;
    background: var(--pf-grey-bg); border: 2px solid var(--pf-grey-border);
    display: flex; align-items: center; justify-content: center;
}
.pf-dash-header-info h1 { font-size: 1.1rem; font-weight: 700; color: var(--pf-text); margin: 0 0 2px; }
.pf-dash-header-info p  { font-size: 0.85rem; color: var(--pf-text-muted); margin: 0; }
.pf-dash-header-actions { display: flex; align-items: center; gap: 8px; margin-left: auto; flex-shrink: 0; }

/* ── Tabs ── */
.pf-dash-tabs {
    display: flex; gap: 0; background: var(--pf-white); border-radius: var(--pf-radius);
    padding: 6px; margin-bottom: 12px; box-shadow: var(--pf-shadow-sm);
    overflow-x: auto; -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.pf-dash-tabs::-webkit-scrollbar { display: none; }
.pf-tab {
    display: flex; align-items: center; gap: 6px; padding: 8px 14px;
    border-radius: var(--pf-radius-sm); border: none; background: none;
    font-size: 0.88rem; font-weight: 500; color: var(--pf-text-muted);
    cursor: pointer; transition: all 0.2s ease; white-space: nowrap; font-family: inherit;
}
.pf-tab:hover  { background: var(--pf-grey-bg); color: var(--pf-text); }
.pf-tab--active { background: var(--pf-blue-light); color: var(--pf-blue); font-weight: 600; }
.pf-tab-count { font-size: 0.75rem; background: var(--pf-grey-bg); padding: 1px 6px; border-radius: 10px; }
.pf-tab--active .pf-tab-count { background: rgba(26,86,160,0.15); }

/* ── Tab Content ── */
.pf-tab-content { display: none; }
.pf-tab-content--active { display: block; }
.pf-card {
    background: var(--pf-white); border-radius: var(--pf-radius);
    padding: 20px; box-shadow: var(--pf-shadow-sm); margin-bottom: 12px;
}
.pf-card-title { font-size: 1.05rem; font-weight: 700; color: var(--pf-text); margin: 0 0 20px; }
.pf-section-label { font-size: 0.8rem; font-weight: 600; color: var(--pf-text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin: 0 0 12px; }
.pf-muted { color: var(--pf-text-muted); }
.pf-muted--sm { font-size: 0.8rem; font-weight: 400; }

/* ── Save Message ── */
.pf-save-msg {
    padding: 10px 16px; border-radius: var(--pf-radius-sm); font-size: 0.88rem;
    margin-bottom: 16px; background: #dcfce7; color: #166534;
}

/* ── Char Count ── */
.pf-char-count { display: block; font-size: 0.78rem; color: var(--pf-text-muted); text-align: right; margin-top: 4px; }

/* ── Abo ── */
.pf-abo-info { background: var(--pf-blue-light); border-radius: var(--pf-radius); padding: 20px; }
.pf-abo-row { display: flex; justify-content: space-between; padding: 8px 0; border-bottom: 1px solid rgba(26,86,160,0.1); font-size: 0.95rem; }
.pf-abo-row:last-child { border-bottom: none; }

/* ── Toggle Cards ── */
.pf-toggles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 10px; }
.pf-toggle-card {
    display: flex; flex-direction: column; align-items: center; gap: 8px;
    padding: 16px 12px; border-radius: var(--pf-radius-sm); border: 2px solid var(--pf-grey-border);
    cursor: pointer; transition: all 0.2s ease; text-align: center;
    font-size: 0.85rem; font-weight: 500; color: var(--pf-text); background: var(--pf-grey-bg);
}
.pf-toggle-card input[type="checkbox"] { display: none; }
.pf-toggle-card-icon { color: var(--pf-text-muted); transition: color 0.2s; }
.pf-toggle-card:hover { border-color: var(--pf-blue); background: var(--pf-blue-light); }
.pf-toggle-card--on { border-color: var(--pf-blue); background: var(--pf-blue-light); color: var(--pf-blue); }
.pf-toggle-card--on .pf-toggle-card-icon { color: var(--pf-blue); }

/* ── Upload Zone ── */
.pf-upload-zone {
    border: 2px dashed var(--pf-grey-border); border-radius: var(--pf-radius-sm);
    padding: 28px 20px; text-align: center; cursor: pointer;
    transition: border-color 0.2s, background 0.2s; margin-bottom: 16px;
    background: var(--pf-grey-bg);
}
.pf-upload-zone:hover { border-color: var(--pf-blue); background: var(--pf-blue-light); }
.pf-upload-zone p { color: var(--pf-text-muted); font-size: 0.9rem; margin: 8px 0 0; }

/* ── Foto Grid ── */
.pf-foto-grid {
    display: grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap: 8px; margin-bottom: 12px;
}
.pf-foto-item { position: relative; border-radius: var(--pf-radius-sm); overflow: hidden; aspect-ratio: 4/5; }
.pf-foto-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pf-foto-item-overlay {
    position: absolute; inset: 0; background: rgba(0,0,0,0.4);
    opacity: 0; transition: opacity 0.2s; display: flex; align-items: center; justify-content: center;
}
.pf-foto-item:hover .pf-foto-item-overlay { opacity: 1; }
.pf-foto-delete {
    background: rgba(217,50,42,0.9); color: #fff; border: none;
    border-radius: 50%; width: 32px; height: 32px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
}

/* ── Hint ── */
.pf-hint { font-size: 0.82rem; color: var(--pf-text-muted); margin-top: 8px; }

/* ── Trainer-Suche ── */
.pft-suche-wrap { width: 100%; max-width: 100%; box-sizing: border-box; }
.pft-suche-box  { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-start; margin-bottom: 4px; }
.pft-suche-box .pf-field { flex: 1; min-width: 200px; margin: 0; }

/* ── Trainer Liste Grid ── */
.pft-liste-grid {
    display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px;
}
@media(max-width:600px){
    .pft-liste-grid { grid-template-columns: repeat(2, 1fr); }
}
.pft-trainer-card {
    background: var(--pf-white); border-radius: var(--pf-radius-sm); overflow: hidden;
    box-shadow: var(--pf-shadow-sm); text-decoration: none; display: block;
    transition: box-shadow 0.2s, transform 0.2s;
}
.pft-trainer-card:hover { box-shadow: var(--pf-shadow); transform: translateY(-2px); }
.pft-trainer-card img { width: 100%; aspect-ratio: 1; object-fit: cover; display: block; }
.pft-trainer-card-placeholder {
    width: 100%; aspect-ratio: 1; background: var(--pf-grey-bg);
    display: flex; align-items: center; justify-content: center; font-size: 40px;
}
.pft-trainer-card-body { padding: 10px 12px 14px; }
.pft-trainer-card-body strong { display: block; font-size: 0.9rem; font-weight: 700; color: var(--pf-text); margin-bottom: 2px; }
.pft-trainer-card-body span  { font-size: 0.8rem; color: var(--pf-text-muted); display: block; }

/* ── Profil Seite ── */
.pft-profil-wrap { max-width: 660px; margin: 0 auto; padding: 0 16px 60px; }
.pft-profil-hero {
    background: var(--pf-text); color: #fff; padding: 32px 24px 24px;
    border-radius: 0 0 var(--pf-radius) var(--pf-radius); margin-bottom: 20px; text-align: center;
}
.pft-profil-hero h1 { font-size: 1.6rem; font-weight: 700; margin: 12px 0 4px; }
.pft-profil-hero p  { color: rgba(255,255,255,0.7); margin: 0 0 12px; font-size: 0.95rem; }
.pft-profil-avatar  { width: 90px; height: 90px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; margin-bottom: 4px; }
.pft-profil-badge   { display: inline-block; background: rgba(255,255,255,0.15); padding: 4px 12px; border-radius: 20px; font-size: 0.8rem; }
.pft-profil-card    { margin-bottom: 14px; }
.pft-profil-grid    { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.pft-profil-field   { background: var(--pf-grey-bg); border-radius: var(--pf-radius-sm); padding: 12px 14px; }
.pft-profil-field strong { display: block; font-size: 0.75rem; color: var(--pf-text-muted); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; margin-bottom: 3px; }
.pft-profil-field span   { font-size: 0.95rem; font-weight: 600; color: var(--pf-text); }
.pft-galerie-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; }
.pft-galerie-grid img { width: 100%; aspect-ratio: 4/5; object-fit: cover; border-radius: var(--pf-radius-sm); }

/* ── Karte ── */
#pft-map-canvas { border-radius: var(--pf-radius); max-width: 100%; box-sizing: border-box; }

/* ── Responsive ── */
@media (max-width: 480px) {
    .pf-field-row     { grid-template-columns: 1fr; }
    .pft-profil-grid  { grid-template-columns: 1fr; }
    .pft-galerie-grid { grid-template-columns: repeat(2, 1fr); }
    .pf-dash-header   { flex-wrap: wrap; }
    .pf-dash-header-actions { margin-left: 0; }
    .pft-liste-grid   { grid-template-columns: repeat(2, 1fr); }
}
