/* Schiff KI-Foto Widget – style.css */

.skf-widget {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    border: 1px solid #e0e0e0;
    border-radius: 10px;
    overflow: hidden;
    background: #fff;
    max-width: 680px;
    margin: 1.5rem 0;
    box-shadow: 0 2px 12px rgba(0,0,0,0.07);
}
.skf-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    border-bottom: 1px solid #f0f0f0;
    background: #fafafa;
}
.skf-ship-info { display: flex; flex-direction: column; gap: 2px; }
.skf-ship-name { font-weight: 600; font-size: 15px; color: #111; letter-spacing: 0.01em; }
.skf-ship-type { font-size: 12px; color: #888; }
.skf-live-badge {
    display: flex; align-items: center; gap: 6px;
    background: #e8f8f3; color: #0f6e56;
    font-size: 12px; font-weight: 500;
    padding: 5px 10px; border-radius: 20px;
}
.skf-pulse {
    display: inline-block; width: 8px; height: 8px;
    background: #31AE86; border-radius: 50%;
    animation: skf-pulse 2s infinite;
}
@keyframes skf-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(49,174,134,0.5); }
    50%       { box-shadow: 0 0 0 5px rgba(49,174,134,0); }
}
.skf-position-bar {
    display: flex; align-items: center; gap: 16px;
    padding: 8px 16px; background: #f7f7f7;
    border-bottom: 1px solid #eee; flex-wrap: wrap;
}
.skf-pos-item { display: flex; align-items: center; gap: 5px; font-size: 12px; color: #555; }
.skf-pos-item svg { flex-shrink: 0; color: #31AE86; }
.skf-location-name { color: #333; font-weight: 500; }
.skf-image-area {
    position: relative; background: #111820; overflow: hidden;
    display: flex; align-items: center; justify-content: center;
    width: 100%; aspect-ratio: 16 / 9;
    height: auto !important;
}
.skf-placeholder { display: flex; flex-direction: column; align-items: center; gap: 10px; color: #fff; opacity: 0.5; }
.skf-placeholder p { font-size: 13px; margin: 0; }
.skf-generated-img { width: 100%; height: 100%; object-fit: contain; display: block; background: #111820; }
.skf-loading {
    position: absolute; inset: 0; background: #0d1b2a;
    display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
}
.skf-spinner {
    width: 36px; height: 36px;
    border: 3px solid rgba(255,255,255,0.1); border-top-color: #31AE86;
    border-radius: 50%; animation: skf-spin 0.8s linear infinite;
}
@keyframes skf-spin { to { transform: rotate(360deg); } }
.skf-loading-text { color: rgba(255,255,255,0.75); font-size: 13px; }
.skf-progress { width: 160px; height: 3px; background: rgba(255,255,255,0.1); border-radius: 2px; overflow: hidden; }
.skf-progress-fill { height: 100%; width: 0%; background: #31AE86; border-radius: 2px; transition: width 0.4s ease; }
.skf-img-badges { position: absolute; top: 10px; right: 10px; }
.skf-badge-ki {
    background: rgba(49,174,134,0.88); color: #fff;
    font-size: 11px; font-weight: 500; padding: 4px 9px; border-radius: 4px; backdrop-filter: blur(4px);
}
.skf-img-caption {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
    color: rgba(255,255,255,0.85); font-size: 11px; padding: 20px 12px 8px; display: none;
}
.skf-btn-fullscreen {
    position: absolute; bottom: 10px; right: 10px;
    background: rgba(0,0,0,0.55); color: #fff; border: none;
    width: 34px; height: 34px; border-radius: 6px; cursor: pointer;
    display: flex; align-items: center; justify-content: center;
    backdrop-filter: blur(4px); transition: background 0.2s; z-index: 10;
}
.skf-btn-fullscreen:hover { background: rgba(49,174,134,0.85); }
.skf-fullscreen-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.95); z-index: 99999;
    display: flex; align-items: center; justify-content: center;
    flex-direction: column; padding: 20px; animation: skf-fadein 0.2s ease;
}
@keyframes skf-fadein { from { opacity: 0; } to { opacity: 1; } }
.skf-fullscreen-img {
    max-width: 100%; max-height: calc(100vh - 80px); object-fit: contain;
    border-radius: 8px; box-shadow: 0 8px 40px rgba(0,0,0,0.6);
}
.skf-fullscreen-close {
    position: fixed; top: 16px; right: 20px;
    background: rgba(255,255,255,0.12); color: #fff; border: none;
    font-size: 28px; width: 44px; height: 44px; border-radius: 50%;
    cursor: pointer; display: flex; align-items: center; justify-content: center;
    line-height: 1; transition: background 0.2s;
}
.skf-fullscreen-close:hover { background: rgba(255,255,255,0.25); }
.skf-fullscreen-caption { color: rgba(255,255,255,0.6); font-size: 12px; margin-top: 12px; text-align: center; }
.skf-footer {
    display: flex; align-items: center; gap: 12px;
    padding: 12px 16px; border-top: 1px solid #f0f0f0; flex-wrap: wrap;
}
.skf-btn-generate {
    display: flex; align-items: center; gap: 8px;
    background: #31AE86; color: #fff; border: none;
    padding: 9px 18px; border-radius: 5px 0 20px 0;
    font-size: 14px; font-weight: 500; cursor: pointer;
    transition: opacity 0.2s, transform 0.1s;
}
.skf-btn-generate:hover   { opacity: 0.88; }
.skf-btn-generate:active  { transform: scale(0.97); }
.skf-btn-generate:disabled { opacity: 0.5; cursor: not-allowed; }
.skf-hint { font-size: 12px; color: #999; }
.skf-error {
    margin: 10px 16px; padding: 10px 14px;
    background: #fff0f0; border-left: 3px solid #e24b4a;
    border-radius: 4px; font-size: 13px; color: #a32d2d;
}
.skf-live-badge.skf-live-alt { background: #fdf3e1; color: #8a5a00; }
.skf-live-badge.skf-live-alt .skf-pulse { background: #e0a020; animation: none; }
.skf-live-badge.skf-live-veraltet { background: #f0f0f0; color: #666; }
.skf-live-badge.skf-live-veraltet .skf-pulse { background: #aaa; animation: none; }
.skf-alter { font-weight: 400; white-space: nowrap; }

/* ── Galerie-Karussell [schiff_ki_galerie] ── */
.skf-galerie {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    border: 1px solid #e0e0e0; border-radius: 10px; overflow: hidden; background: #fff;
    width: 100%; max-width: 100%; margin: 20px 0 0; box-shadow: 0 2px 12px rgba(0,0,0,0.07);
    box-sizing: border-box;
}
.skf-gal-zaehler {
    background: #e8f8f3; color: #0f6e56; font-size: 12px; font-weight: 500;
    padding: 5px 10px; border-radius: 20px; white-space: nowrap;
}
.skf-gal-leer { padding: 28px 16px; text-align: center; font-size: 13px; color: #888; }
.skf-gal-buehne { position: relative; background: #111820; }
.skf-gal-track {
    position: relative; display: flex; overflow-x: auto; scroll-snap-type: x mandatory;
    scroll-behavior: smooth; scrollbar-width: none; outline: none;
}
.skf-gal-track::-webkit-scrollbar { display: none; }
.skf-gal-slide {
    position: relative; flex: 0 0 100%; margin: 0; aspect-ratio: 16 / 9;
    scroll-snap-align: start; cursor: zoom-in; overflow: hidden;
}
.skf-gal-slide img { width: 100%; height: 100%; object-fit: cover; display: block; }
.skf-gal-slide figcaption {
    position: absolute; bottom: 0; left: 0; right: 0;
    background: linear-gradient(transparent, rgba(0,0,0,0.6));
    color: rgba(255,255,255,0.9); font-size: 12px; padding: 22px 12px 8px;
}
.skf-gal-pfeil {
    position: absolute; top: 50%; transform: translateY(-50%);
    width: 40px; height: 40px; border-radius: 50%; border: none; cursor: pointer;
    background: rgba(0,0,0,0.5); color: #fff; font-size: 26px; line-height: 1;
    display: flex; align-items: center; justify-content: center; padding: 0 0 3px;
    backdrop-filter: blur(4px); transition: background 0.2s; z-index: 5;
}
.skf-gal-pfeil:hover { background: rgba(49,174,134,0.9); }
.skf-gal-zurueck { left: 10px; }
.skf-gal-vor { right: 10px; }
.skf-gal-thumbs {
    display: flex; gap: 6px; padding: 8px; overflow-x: auto; background: #f7f7f7;
    scrollbar-width: thin;
}
.skf-gal-thumb {
    flex: 0 0 auto; width: 88px; aspect-ratio: 16 / 9; padding: 0; border: 2px solid transparent;
    border-radius: 5px; overflow: hidden; cursor: pointer; background: #ddd; opacity: 0.65;
    transition: opacity 0.2s, border-color 0.2s;
}
.skf-gal-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.skf-gal-thumb:hover { opacity: 0.9; }
.skf-gal-thumb.aktiv { border-color: #31AE86; opacity: 1; }
.skf-widget .skf-gal-thumbs { border-top: 1px solid #eee; }

@media (max-width: 480px) {
    .skf-footer { flex-direction: column; align-items: flex-start; }
    .skf-btn-generate { width: 100%; justify-content: center; }
    .skf-header { flex-wrap: wrap; gap: 8px; }
    .skf-gal-pfeil { width: 34px; height: 34px; font-size: 22px; }
    .skf-gal-thumb { width: 72px; }
}

/* Theme-Schutz: Astra gibt jedem <button> Innenabstand (10px 20px), Mindesthöhen und eigene Hover-Farben –
   bei den kleinen Symbol-Knöpfen bleibt dann für das Icon keine Breite übrig. */
.skf-widget .skf-btn-fullscreen, .skf-widget .skf-gal-pfeil, .skf-galerie .skf-gal-pfeil,
.skf-widget .skf-fullscreen-close, .skf-galerie .skf-fullscreen-close,
.skf-widget .skf-gal-thumb, .skf-galerie .skf-gal-thumb {
    padding: 0 !important; min-width: 0 !important; min-height: 0 !important; line-height: 1 !important;
    box-shadow: none !important; text-transform: none !important;
}
.skf-widget .skf-gal-pfeil, .skf-galerie .skf-gal-pfeil { padding-bottom: 3px !important; }
.skf-widget .skf-btn-fullscreen svg { flex-shrink: 0; width: 16px; height: 16px; }
.skf-widget .skf-btn-fullscreen:hover, .skf-widget .skf-btn-fullscreen:focus { background: rgba(49,174,134,0.85) !important; color: #fff !important; }
.skf-widget .skf-gal-pfeil:hover, .skf-galerie .skf-gal-pfeil:hover,
.skf-widget .skf-gal-pfeil:focus, .skf-galerie .skf-gal-pfeil:focus { background: rgba(49,174,134,0.9) !important; color: #fff !important; }
