/**
 * Klaro Cookie Banner - Einfaches Styling
 * kosmetikerin.org
 */

/* Basis-Font */
.klaro {
    font-family: 'Inter', system-ui, sans-serif !important;
}

/* ========================================
   MODAL ZENTRIERUNG
   ======================================== */
.klaro .cookie-modal,
.klaro .cookie-notice {
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
}

/* Modal Box */
.klaro .cm-modal {
    background: #1f1f1f !important;
    border-radius: 12px !important;
    max-width: 520px !important;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5) !important;
}

/* Notice Modal (erster Banner) */
.klaro .cookie-modal-notice {
    max-width: 550px !important;
    width: 550px !important;
}

.klaro .cookie-notice .cn-body {
    background: none !important;
    border-radius: 12px !important;
    max-width: 550px !important;
    padding: 28px !important;
    box-shadow: none !important;
    display: flex !important;
    flex-direction: column !important;
}

.klaro .cookie-notice p {
    color: #e0e0e0 !important;
    font-size: 15px !important;
    line-height: 1.7 !important;
    margin-bottom: 20px !important;
}

.klaro .cookie-notice p strong {
    color: white !important;
}

/* Einstellungen Button - oben mit Border */
.klaro .cookie-notice .cn-learn-more {
    order: 1 !important;
    color: #ccc !important;
    font-size: 14px !important;
    background: transparent !important;
    border: 1px solid #444 !important;
    border-radius: 6px !important;
    padding: 10px 20px !important;
    margin-bottom: 24px !important;
    align-self: flex-start !important;
    text-decoration: none !important;
}

.klaro .cookie-notice .cn-learn-more:hover {
    border-color: #666 !important;
    color: white !important;
}

/* Buttons Container - unten */
.klaro .cookie-notice .cn-buttons {
    order: 2 !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    gap: 16px !important;
    margin-top: auto !important;
    align-items: center !important;
    justify-content: flex-start !important;
}

.klaro .cookie-notice .cn-buttons button {
    padding: 14px 28px !important;
    white-space: nowrap !important;
}

/* Backdrop dunkler */
.klaro .cm-bg {
    background: rgba(0, 0, 0, 0.6) !important;
}

/* Header */
.klaro .cm-header {
    background: #1f1f1f !important;
    border-bottom: 1px solid #333 !important;
    padding: 20px 24px !important;
}

.klaro .cm-header h1 {
    color: white !important;
    font-size: 20px !important;
    font-weight: 600 !important;
    margin: 0 !important;
}

/* Body */
.klaro .cm-body {
    background: #1f1f1f !important;
    padding: 20px 24px !important;
}

.klaro .cm-body p {
    color: #a0a0a0 !important;
    font-size: 14px !important;
    line-height: 1.6 !important;
    margin-bottom: 16px !important;
}

/* Links */
.klaro a {
    color: #B8860B !important;
}

/* ========================================
   SERVICES
   ======================================== */
.klaro .cm-services {
    margin: 0 !important;
}

.klaro .cm-service {
    background: #2a2a2a !important;
    border: 1px solid #3a3a3a !important;
    border-radius: 8px !important;
    margin-bottom: 10px !important;
    padding: 14px 16px !important;
    padding-left: 16px !important;
}

/* Service Label Container */
.klaro .cm-service > label {
    display: flex !important;
    align-items: center !important;
    width: 100% !important;
    gap: 10px !important;
}

.klaro .cm-service:last-child {
    margin-bottom: 0 !important;
}

/* Service Text - LINKS */
.klaro .cm-service .cm-caret,
.klaro .cm-service .cm-content {
    order: 1 !important;
    flex: 1 !important;
    min-width: 0 !important;
}

/* Content Bereich mit Text - nimmt verfügbaren Platz */
.klaro .cm-list-input + .cm-list-label .cm-list-title,
.klaro .cm-list-label .cm-list-title {
    flex: 1 !important;
    min-width: 0 !important;
}

.klaro .cm-service .title {
    color: white !important;
    font-size: 14px !important;
    font-weight: 500 !important;
}

.klaro .cm-service .description {
    color: #888 !important;
    font-size: 12px !important;
    margin-top: 2px !important;
}

/* Required Badge */
.klaro .cm-required {
    background: rgba(184, 134, 11, 0.2) !important;
    color: #B8860B !important;
    font-size: 11px !important;
    padding: 2px 8px !important;
    border-radius: 4px !important;
    margin-left: 8px !important;
}

/* Label als Flex-Container - Toggle nach rechts */
.klaro .cm-list-label {
    display: flex !important;
    flex-wrap: wrap !important;
    align-items: center !important;
    gap: 8px !important;
    width: 100% !important;
}

/* Titel und Required Badge links */
.klaro .cm-list-title {
    order: 1 !important;
}

.klaro .cm-required {
    order: 2 !important;
}

/* Switch - Position korrigieren (überschreibt Klaro-Standard) */
.klaro .cm-switch {
    position: relative !important;
    float: none !important;
    margin-left: auto !important;
    flex-shrink: 0 !important;
    left: auto !important;
    right: auto !important;
    top: auto !important;
    transform: none !important;
}

/* Switch ganz rechts mit margin-left: auto */
.klaro .cm-list-label .cm-switch {
    order: 3 !important;
    margin-left: auto !important;
    position: relative !important;
    left: auto !important;
    right: auto !important;
}

/* Überschreibe absolute Positionierung innerhalb des Labels */
.klaro .cm-service label {
    position: relative !important;
}

.klaro .cm-service label .cm-switch {
    position: static !important;
    margin-left: auto !important;
}

.klaro .cm-switch .slider {
    background: #555 !important;
    width: 46px !important;
    height: 24px !important;
    border-radius: 12px !important;
    display: block !important;
    position: relative !important;
}

.klaro .cm-switch input:checked + .slider {
    background: #B8860B !important;
}

.klaro .cm-switch .slider::before {
    content: '' !important;
    width: 20px !important;
    height: 20px !important;
    background: white !important;
    position: absolute !important;
    top: 2px !important;
    left: 2px !important;
    border-radius: 50% !important;
    transition: transform 0.2s !important;
}

.klaro .cm-switch input:checked + .slider::before {
    transform: translateX(22px) !important;
}

.klaro .cm-switch input {
    display: none !important;
}

/* ========================================
   FOOTER / BUTTONS
   ======================================== */
.klaro .cm-footer {
    background: #181818 !important;
    border-top: 1px solid #333 !important;
    padding: 16px 24px !important;
    display: flex !important;
    gap: 10px !important;
    justify-content: flex-end !important;
}

.klaro .cm-footer button,
.klaro .cn-buttons button {
    border-radius: 6px !important;
    padding: 12px 20px !important;
    font-weight: 500 !important;
    font-size: 14px !important;
    cursor: pointer !important;
    border: none !important;
}

/* Alle Akzeptieren - Gold */
.klaro .cm-btn-success {
    background: #B8860B !important;
    color: white !important;
}

.klaro .cm-btn-success:hover {
    background: #9a7209 !important;
}

/* Speichern */
.klaro .cm-btn-info {
    background: #333 !important;
    color: white !important;
}

/* Nur notwendige */
.klaro .cm-btn-danger {
    background: transparent !important;
    color: #999 !important;
    border: 1px solid #444 !important;
}

.klaro .cm-btn-danger:hover {
    color: white !important;
}

/* Close Button */
.klaro .hide {
    color: #666 !important;
    font-size: 24px !important;
}

.klaro .hide:hover {
    color: white !important;
}

/* ========================================
   VERSTECKEN
   ======================================== */
/* Powered By */
.klaro .cm-powered-by {
    display: none !important;
}

/* 4. Service (disableAll) verstecken */
.klaro .cm-services .cm-service:nth-child(4) {
    display: none !important;
}

/* Purpose Labels verstecken */
.klaro .cm-service .purposes {
    display: none !important;
}

/* ========================================
   MOBILE
   ======================================== */
@media (max-width: 500px) {
    .klaro .cm-modal {
        margin: 16px !important;
        max-width: calc(100% - 32px) !important;
    }

    .klaro .cm-footer {
        flex-direction: column !important;
    }

    .klaro .cm-footer button {
        width: 100% !important;
    }
}
