/* ============================================================
   LA Photography – Magnet Upload  v1.1
   Stil: minimalistisch, schwarz/weiß, fotografisch elegant
   Schriften: Fraunces (Überschriften), Montserrat (Fließtext)
   ============================================================ */

.sr-only {
    position: absolute; width: 1px; height: 1px;
    padding: 0; margin: -1px; overflow: hidden;
    clip: rect(0,0,0,0); white-space: nowrap; border: 0;
}

/* ── Wrapper ── */
.la-magnet-wrap {
    font-family: 'Montserrat', 'Helvetica Neue', Arial, sans-serif;
    font-weight: 400;
    color: #1a1a1a;
    max-width: 700px;
    margin: 0 auto;
    padding: 2rem 1.25rem 4rem;
    -webkit-font-smoothing: antialiased;
}

/* ══════════════════════════════════════════════
   SCHRIFTARTEN
══════════════════════════════════════════════ */
.la-panel-title,
.la-magnet-wrap h1,
.la-magnet-wrap h2,
.la-magnet-wrap h3 {
    font-family: 'Fraunces', Georgia, 'Times New Roman', serif;
    font-weight: 600;
    letter-spacing: -0.02em;
}

.la-panel-title {
    font-size: 1.75rem;
    margin: 0 0 0.5rem;
    line-height: 1.15;
}

.la-panel-sub {
    font-size: 0.9375rem;
    color: #555;
    margin: 0 0 2rem;
    line-height: 1.65;
}

/* ══════════════════════════════════════════════
   SCHRITTANZEIGE
══════════════════════════════════════════════ */
.la-steps {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 3rem;
}
.la-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}
.la-step-num {
    width: 2.25rem; height: 2.25rem;
    border-radius: 50%;
    border: 2px solid #ddd;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; font-weight: 600;
    color: #ccc;
    background: #fff;
    transition: all 0.3s ease;
}
.la-step-label {
    font-size: 0.7rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: #ccc;
    transition: color 0.3s ease;
}
.la-step.active .la-step-num  { border-color: #1a1a1a; background: #1a1a1a; color: #fff; }
.la-step.active .la-step-label { color: #1a1a1a; font-weight: 600; }
.la-step.done   .la-step-num  { border-color: #1a1a1a; background: #1a1a1a; color: #fff; }
.la-step.done   .la-step-label { color: #555; }
.la-step-line {
    flex: 1; height: 1px; background: #ddd;
    min-width: 3rem; margin: 0 0.5rem 1.5rem;
}

/* ══════════════════════════════════════════════
   PANELS
══════════════════════════════════════════════ */
.la-panel { animation: la-fade-in 0.3s ease; }
.la-panel[hidden] { display: none; }
@keyframes la-fade-in {
    from { opacity: 0; transform: translateY(6px); }
    to   { opacity: 1; transform: translateY(0); }
}

/* ══════════════════════════════════════════════
   UPLOAD-ZONE
══════════════════════════════════════════════ */
.la-upload-zone {
    border: 2px dashed #ccc;
    border-radius: 4px;
    padding: 2.5rem 1.5rem;
    text-align: center;
    cursor: pointer;
    transition: border-color 0.2s, background 0.2s;
    margin-bottom: 1.5rem;
}
.la-upload-zone:hover,
.la-upload-zone.drag-over { border-color: #1a1a1a; background: #f8f8f8; }
.la-upload-zone p { margin: 0.3rem 0; font-size: 0.9375rem; color: #444; }
.la-upload-zone strong { font-weight: 600; color: #1a1a1a; }
.la-upload-hint { font-size: 0.8rem !important; color: #999 !important; }
.la-upload-icon { font-size: 2.25rem; line-height: 1; margin-bottom: 0.6rem; color: #1a1a1a; }

/* ══════════════════════════════════════════════
   FOTO-GRID (Karten)
══════════════════════════════════════════════ */
.la-photo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.la-photo-card {
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
    position: relative;
    transition: box-shadow 0.2s;
}
.la-photo-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.1); }

/* Entfernen-Button */
.la-photo-remove {
    position: absolute;
    top: 0.4rem; right: 0.4rem;
    width: 1.6rem; height: 1.6rem;
    border-radius: 50%;
    background: rgba(0,0,0,0.65);
    color: #fff;
    border: none;
    font-size: 0.9rem;
    line-height: 1;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    z-index: 2;
    transition: background 0.2s;
}
.la-photo-remove:hover { background: #c00; }

/* Thumbnail */
.la-photo-thumb-wrap {
    position: relative;
    aspect-ratio: 1;
    overflow: hidden;
    background: #f0f0f0;
}
.la-photo-thumb {
    width: 100%; height: 100%;
    object-fit: cover;
    display: block;
}

/* Zuschnitt-Status-Badge */
.la-crop-badge {
    position: absolute;
    bottom: 0.4rem; left: 0.4rem;
    font-size: 0.65rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    padding: 0.2rem 0.5rem;
    border-radius: 2px;
}
.la-crop-badge.pending {
    background: rgba(255,200,0,0.92);
    color: #333;
}
.la-crop-badge.done {
    background: rgba(20,20,20,0.85);
    color: #fff;
}

/* Karteninhalt */
.la-photo-settings {
    padding: 0.75rem;
}

/* Format-Pills */
.la-format-pills {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 0.3rem;
    margin-bottom: 0.75rem;
}
.la-pill {
    padding: 0.35rem 0.15rem;
    font-family: inherit;
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.02em;
    border: 1.5px solid #ccc;
    border-radius: 2px;
    background: #fff;
    color: #666;
    cursor: pointer;
    text-align: center;
    transition: all 0.15s;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.la-pill:hover  { border-color: #999; color: #1a1a1a; }
.la-pill.active { border-color: #1a1a1a; background: #1a1a1a; color: #fff; }

/* Mengenstepper */
.la-qty-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.la-qty-label {
    font-size: 0.8rem;
    color: #555;
    white-space: nowrap;
}
.la-qty-control {
    display: flex;
    align-items: center;
    gap: 0;
    border: 1.5px solid #ccc;
    border-radius: 2px;
    overflow: hidden;
}
.la-qty-btn {
    width: 2rem; height: 2rem;
    font-size: 1rem;
    font-family: inherit;
    font-weight: 500;
    border: none;
    background: #f5f5f5;
    color: #1a1a1a;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    transition: background 0.15s;
    flex-shrink: 0;
}
.la-qty-btn:hover { background: #1a1a1a; color: #fff; }
.la-qty-display {
    width: 2rem;
    text-align: center;
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 2rem;
    border-left: 1.5px solid #ccc;
    border-right: 1.5px solid #ccc;
    user-select: none;
}

/* ══════════════════════════════════════════════
   WEITERES FOTO BUTTON
══════════════════════════════════════════════ */
.la-btn-add-more {
    width: 100%;
    margin-bottom: 1.5rem;
    justify-content: center;
    font-size: 0.875rem;
}

/* ══════════════════════════════════════════════
   CROP FORTSCHRITTSBALKEN
══════════════════════════════════════════════ */
.la-crop-progress-bar {
    margin-bottom: 1.5rem;
}
.la-crop-progress-label {
    display: block;
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: #555;
    margin-bottom: 0.5rem;
}
.la-crop-progress-track {
    height: 3px;
    background: #e0e0e0;
    border-radius: 2px;
    overflow: hidden;
}
.la-crop-progress-fill {
    height: 100%;
    background: #1a1a1a;
    border-radius: 2px;
    transition: width 0.4s ease;
    width: 0%;
}

/* Cropper */
.la-cropper-container {
    max-height: 440px;
    overflow: hidden;
    border: 1px solid #e0e0e0;
    border-radius: 4px;
    background: #f0f0f0;
    margin-bottom: 1rem;
}
.la-cropper-container img { display: block; max-width: 100%; }
.cropper-view-box, .cropper-face {
    border-color: #1a1a1a !important;
    outline-color: rgba(26,26,26,0.75) !important;
}

/* Kreisförmige Crop-Maske für runde Magnete */
.la-cropper-round .cropper-view-box,
.la-cropper-round .cropper-face {
    border-radius: 50% !important;
}
.la-cropper-round .cropper-view-box {
    outline: none !important;
    box-shadow: 0 0 0 1px #fff, 0 0 0 2px rgba(0,0,0,0.5);
}
.la-cropper-round .cropper-dashed {
    display: none !important;
}

/* ══════════════════════════════════════════════
   KONTAKTFORMULAR
══════════════════════════════════════════════ */
.la-form-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}
@media (max-width: 500px) {
    .la-form-grid { grid-template-columns: 1fr; }
}
.la-field { display: flex; flex-direction: column; gap: 0.35rem; }
.la-field-full { grid-column: 1 / -1; }

.la-label {
    font-size: 0.8rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: #1a1a1a;
}
.la-required { color: #c00; }

.la-input {
    font-family: inherit;
    font-size: 0.9375rem;
    padding: 0.7rem 0.875rem;
    border: 1.5px solid #ccc;
    border-radius: 2px;
    background: #fff;
    color: #1a1a1a;
    transition: border-color 0.2s;
    width: 100%;
    box-sizing: border-box;
}
.la-input:focus {
    outline: none;
    border-color: #1a1a1a;
}
.la-input::placeholder { color: #aaa; }
.la-input.error { border-color: #c00; }

/* ══════════════════════════════════════════════
   BESTELLÜBERSICHT (Schritt 3b)
══════════════════════════════════════════════ */
.la-summary {
    background: #f8f8f8;
    border-radius: 4px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.75rem;
    font-size: 0.9rem;
    line-height: 1.8;
}
.la-summary-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: #888;
    margin: 0 0 0.5rem;
}
.la-summary-row {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.45rem 0;
    border-bottom: 1px solid #eee;
}
.la-summary-row:last-child { border-bottom: none; }
.la-summary-desc { flex: 1; font-size: 0.875rem; line-height: 1.4; }
.la-summary-desc small { color: #999; }
.la-summary-qty { flex-shrink: 0; white-space: nowrap; }

/* Vorschau-Thumbnail in der Bestellübersicht */
.la-summary-thumb {
    flex-shrink: 0;
    width: 3rem;
    height: 3rem;
    border-radius: 3px;
    overflow: hidden;
    background: #f0f0f0;
    border: 1px solid #e0e0e0;
}
.la-summary-thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.la-summary-thumb-round {
    border-radius: 50%;
}
.la-summary-thumb-empty {
    display: block;
    width: 100%;
    height: 100%;
    background: #e8e8e8;
}
.la-summary-total {
    font-weight: 600;
    font-size: 0.95rem;
    margin-top: 0.5rem;
    padding-top: 0.5rem;
    border-top: 2px solid #1a1a1a;
    display: flex;
    justify-content: space-between;
}

/* ══════════════════════════════════════════════
   DATENSCHUTZ
══════════════════════════════════════════════ */
.la-privacy-box {
    background: #f8f8f8;
    border-left: 3px solid #1a1a1a;
    border-radius: 2px;
    padding: 1.5rem;
    margin-bottom: 2rem;
}
.la-privacy-title {
    font-family: 'Fraunces', Georgia, serif;
    font-size: 0.875rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin: 0 0 0.75rem;
}
.la-privacy-text {
    font-size: 0.875rem;
    color: #555;
    line-height: 1.7;
    margin: 0 0 1.25rem;
}
.la-privacy-text a { color: #1a1a1a; text-decoration: underline; }

/* Checkbox */
.la-checkbox-label {
    display: flex; align-items: flex-start;
    gap: 0.75rem; cursor: pointer;
    font-size: 0.875rem; color: #333; line-height: 1.6;
}
.la-checkbox-label input[type="checkbox"] { position: absolute; opacity: 0; width: 0; height: 0; }
.la-checkbox-custom {
    flex-shrink: 0; width: 1.25rem; height: 1.25rem;
    border: 2px solid #1a1a1a; border-radius: 2px;
    display: flex; align-items: center; justify-content: center;
    margin-top: 0.1rem; transition: background 0.2s; background: #fff;
}
.la-checkbox-label input:checked + .la-checkbox-custom { background: #1a1a1a; }
.la-checkbox-label input:checked + .la-checkbox-custom::after {
    content: '';
    display: block; width: 5px; height: 9px;
    border: 2px solid #fff; border-top: none; border-left: none;
    transform: rotate(45deg) translate(-1px,-1px);
}

/* Zahlungshinweis */
.la-payment-note {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    background: #f8f8f8;
    border: 1px solid #e0e0e0;
    border-radius: 2px;
    padding: 0.9rem 1.25rem;
    font-size: 0.875rem;
    color: #444;
    margin-bottom: 1.5rem;
    line-height: 1.5;
}
.la-payment-icon { font-size: 1.1rem; flex-shrink: 0; }

/* ══════════════════════════════════════════════
   BUTTONS
══════════════════════════════════════════════ */
.la-btn {
    display: inline-flex; align-items: center; gap: 0.5rem;
    padding: 0.8rem 2rem;
    font-family: inherit; font-size: 0.9rem; font-weight: 500;
    letter-spacing: 0.04em;
    border-radius: 2px; border: 2px solid transparent;
    cursor: pointer; transition: all 0.2s ease;
    text-decoration: none; white-space: nowrap;
}
.la-btn:focus-visible { outline: 3px solid #1a1a1a; outline-offset: 2px; }

.la-btn-primary { background: #1a1a1a; color: #fff; border-color: #1a1a1a; }
.la-btn-primary:hover:not(:disabled) { background: #333; border-color: #333; }
.la-btn-primary:disabled { background: #ccc; border-color: #ccc; cursor: not-allowed; color: #888; }

.la-btn-ghost { background: transparent; color: #1a1a1a; border-color: #1a1a1a; }
.la-btn-ghost:hover { background: #1a1a1a; color: #fff; }

/* Kleiner Hilfs-Button (z. B. Drehen) */
.la-btn-sm { padding: 0.5rem 1rem; font-size: 0.8rem; }

.la-nav-row {
    display: flex; align-items: center;
    justify-content: space-between;
    margin-top: 2rem; gap: 1rem;
}
.la-nav-right { justify-content: flex-end; }

/* ══════════════════════════════════════════════
   SPINNER
══════════════════════════════════════════════ */
.la-spinner { display: inline-flex; align-items: center; gap: 0.5rem; }
.la-spinner::before {
    content: ''; display: inline-block;
    width: 0.9rem; height: 0.9rem;
    border: 2px solid rgba(255,255,255,0.35);
    border-top-color: #fff; border-radius: 50%;
    animation: la-spin 0.75s linear infinite;
}
@keyframes la-spin { to { transform: rotate(360deg); } }

/* ══════════════════════════════════════════════
   FEHLERANZEIGE
══════════════════════════════════════════════ */
.la-error-msg {
    background: #fff0f0; border-left: 3px solid #c00;
    color: #900; font-size: 0.875rem;
    padding: 0.75rem 1rem; border-radius: 2px;
    margin-bottom: 1rem; display: none;
}
.la-error-msg.visible { display: block; }

/* ══════════════════════════════════════════════
   ERFOLG
══════════════════════════════════════════════ */
#la-panel-success { text-align: center; padding: 2rem 0; }
.la-success-icon {
    width: 5rem; height: 5rem; border-radius: 50%;
    background: #1a1a1a; color: #fff;
    font-size: 2rem;
    display: flex; align-items: center; justify-content: center;
    margin: 0 auto 1.5rem;
}
.la-order-id {
    display: inline-block;
    font-family: 'Fraunces', Georgia, serif;
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    background: #f0f0f0;
    padding: 0.5rem 1.5rem;
    border-radius: 4px;
    margin: 0.25rem auto 1.5rem;
}

/* Seitentitel "Magnet Upload" → Fraunces (über Theme-Stile) */
.entry-title,
.page-title,
h1.page-title,
.wp-block-post-title {
    font-family: 'Fraunces', Georgia, 'Times New Roman', serif !important;
}

/* [hidden]-Elemente zuverlässig verstecken (Theme-Override-Schutz) */
[hidden] { display: none !important; }

/* ══════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════ */

/* ── Tablets / mittlere Geräte (≤600px) ── */
@media (max-width: 600px) {
    .la-magnet-wrap { padding: 1.25rem 1rem 3rem; }
    .la-cropper-container { max-height: 350px; }
}

/* ── Handys (≤480px) ── */
@media (max-width: 480px) {
    /* Foto-Grid: eine Spalte */
    .la-photo-grid { grid-template-columns: 1fr; }

    /* Karten horizontal: Vorschau links, Einstellungen rechts */
    .la-photo-card { display: flex; flex-direction: row; align-items: stretch; }
    .la-photo-thumb-wrap {
        aspect-ratio: auto;
        width: 6rem;
        min-height: 6rem;
        flex-shrink: 0;
    }
    .la-photo-settings { flex: 1; min-width: 0; padding: 0.6rem 0.7rem; }

    .la-cropper-container { max-height: 300px; }
    .la-panel-title { font-size: 1.35rem; }

    /* Navigation */
    .la-nav-row { flex-direction: column-reverse; gap: 0.6rem; }
    .la-nav-row .la-btn {
        width: 100%;
        justify-content: center;
        font-size: 0.82rem;
        padding: 0.75rem 1rem;
        white-space: normal;
        text-align: center;
    }

    /* Datenschutz-Box kompakter */
    .la-privacy-box { padding: 0.875rem 1rem; margin-bottom: 1.25rem; }
    .la-privacy-title { font-size: 0.78rem; margin-bottom: 0.5rem; }
    .la-privacy-text { font-size: 0.775rem; line-height: 1.55; margin-bottom: 0.75rem; }
    .la-checkbox-label { font-size: 0.78rem; line-height: 1.45; gap: 0.6rem; }

    /* Bezahlen-Hinweis kompakter */
    .la-payment-note {
        font-size: 0.8rem;
        padding: 0.65rem 0.9rem;
        gap: 0.5rem;
        line-height: 1.4;
        margin-bottom: 1.25rem;
    }
    .la-payment-icon { font-size: 1rem; }
}

/* ── Sehr kleine Handys (≤360px) ── */
@media (max-width: 360px) {
    .la-photo-thumb-wrap { width: 5rem; min-height: 5rem; }
    .la-pill { font-size: 0.65rem; }
    .la-privacy-text, .la-checkbox-label { font-size: 0.74rem; }
}
