/* CH Share Plugin Styles */

.ch-share-container {
    margin: 20px 0;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

.ch-share-title {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}

.ch-share-buttons {
    display: flex;
    gap: 8px;
    align-items: center;
}

/* Horizontales Layout */
.ch-share-horizontal .ch-share-buttons {
    flex-direction: row;
    flex-wrap: wrap;
}

/* Vertikales Layout */
.ch-share-vertical .ch-share-buttons {
    flex-direction: column;
    align-items: flex-start;
}

/* Share Button Basis-Styling */
.ch-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-decoration: none !important; /* Unterstreichung komplett entfernen */
    border-radius: 6px;
    transition: all 0.3s ease;
    font-weight: 500;
    cursor: pointer;
    border: none;
    outline: none;
    color: white !important; /* Alle Icons und Texte weiß */
}

.ch-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    text-decoration: none !important; /* Auch beim Hover keine Unterstreichung */
    color: white !important; /* Auch beim Hover weiß bleiben */
}

.ch-share-btn:focus {
    outline: 2px solid #007cba;
    outline-offset: 2px;
    text-decoration: none !important; /* Auch beim Focus keine Unterstreichung */
}

.ch-share-btn i {
    line-height: 1;
    color: white !important; /* Icons explizit weiß */
    text-decoration: none !important; /* Icons keine Unterstreichung */
}

.ch-share-label {
    margin-left: 8px;
    font-size: inherit;
    color: white !important; /* Labels explizit weiß */
    text-decoration: none !important; /* Labels keine Unterstreichung */
}

/* Größenvarianten */
.ch-share-tiny .ch-share-btn {
    padding: 4px 6px;
    font-size: 12px;
    min-width: 28px;
    min-height: 28px;
}

.ch-share-tiny .ch-share-btn i {
    font-size: 12px;
}

.ch-share-tiny .ch-share-container {
    margin: 8px 0;
}

.ch-share-tiny .ch-share-buttons {
    gap: 4px;
}

.ch-share-small .ch-share-btn {
    padding: 8px 12px;
    font-size: 14px;
}

.ch-share-small .ch-share-btn i {
    font-size: 16px;
}

.ch-share-medium .ch-share-btn {
    padding: 10px 16px;
    font-size: 15px;
}

.ch-share-medium .ch-share-btn i {
    font-size: 18px;
}

.ch-share-large .ch-share-btn {
    padding: 12px 20px;
    font-size: 16px;
}

.ch-share-large .ch-share-btn i {
    font-size: 20px;
}

/* Platform-spezifische Farben */
.ch-share-facebook {
    background-color: #1877f2;
    color: white;
}

.ch-share-facebook:hover {
    background-color: #166fe5;
    color: white;
}

.ch-share-twitter {
    background-color: #1da1f2;
    color: white;
}

.ch-share-twitter:hover {
    background-color: #1991db;
    color: white;
}

.ch-share-whatsapp {
    background-color: #25d366;
    color: white;
}

.ch-share-whatsapp:hover {
    background-color: #22c55e;
    color: white;
}

.ch-share-telegram {
    background-color: #0088cc;
    color: white;
}

.ch-share-telegram:hover {
    background-color: #007bb5;
    color: white;
}

.ch-share-linkedin {
    background-color: #0077b5;
    color: white;
}

.ch-share-linkedin:hover {
    background-color: #006ba1;
    color: white;
}

.ch-share-email {
    background-color: #ea4335;
    color: white;
}

.ch-share-email:hover {
    background-color: #d93025;
    color: white;
}

.ch-share-copy {
    background-color: #6b7280;
    color: white;
}

.ch-share-copy:hover {
    background-color: #4b5563;
    color: white;
}

.ch-share-copy.copied {
    background-color: #10b981;
    color: white;
}

/* Vertikales Layout in der Sidebar */
.ch-share-vertical .ch-share-btn {
    width: 100%;
    justify-content: flex-start;
    margin-bottom: 5px;
}

.ch-share-vertical .ch-share-btn:last-child {
    margin-bottom: 0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .ch-share-horizontal .ch-share-buttons {
        flex-wrap: wrap;
        gap: 6px;
    }

    .ch-share-horizontal .ch-share-btn .ch-share-label {
        display: none;
    }

    .ch-share-horizontal .ch-share-btn {
        min-width: 44px;
        min-height: 44px;
        padding: 12px;
    }
}

/* Widget-spezifische Styles */
.widget .ch-share-container {
    margin: 0;
}

.widget .ch-share-title {
    font-size: 13px;
    margin-bottom: 8px;
}

/* Erfolgsanimation für "Link kopiert" */
@keyframes copied-feedback {
    0% { transform: scale(1); }
    50% { transform: scale(1.05); }
    100% { transform: scale(1); }
}

.ch-share-copy.copied {
    animation: copied-feedback 0.3s ease;
}

/* Accessibility Verbesserungen */
.ch-share-btn:focus-visible {
    outline: 2px solid #007cba;
    outline-offset: 2px;
}

@media (prefers-reduced-motion: reduce) {
    .ch-share-btn {
        transition: none;
    }

    .ch-share-btn:hover {
        transform: none;
    }

    .ch-share-copy.copied {
        animation: none;
    }
}


/* ===== Share: Overflow-Fix (mobile + narrow columns) ===== */

/* Box-Sizing & Max-Breite: Padding zählt zur Breite, nichts ragt raus */
.ch-share-container,
.ch-share-buttons,
.ch-share-btn {
    box-sizing: border-box;
    max-width: 100%;
}

/* Container selbst niemals breiter als der Inhaltsbereich */
.ch-share-container {
    width: 100%;
}

/* Vertikale Variante: volle Breite, aber mit border-box */
.ch-share-vertical .ch-share-buttons { width: 100%; }
.ch-share-vertical .ch-share-btn {
    width: 100%;
    max-width: 100%;
}

/* Horizontale Variante: ebenfalls innerhalb des Containers bleiben */
.ch-share-horizontal .ch-share-buttons { width: 100%; }

/* Sicherheit: in sehr schmalen Spalten Overflow verhindern */
.ch-share-buttons { overflow-x: clip; } /* kein Scrollbalken, aber kein Ausbluten */

/* Mobile Tweaks: Ränder/Padding anziehen, Labels ausblenden bleibt */
@media (max-width: 768px){
    /* Falls dein Theme dem Share-Block zusätzliche Innenabstände gibt:
       Seitliche Margins neutralisieren */
    .tb-article__share .ch-share-container { margin-left: 0; margin-right: 0; }

    /* etwas kompakter, damit 44px Touch-Ziel erhalten bleibt */
    .ch-share-horizontal .ch-share-btn,
    .ch-share-vertical .ch-share-btn {
        padding: 10px 12px;
    }
}

/* Ultra-schmale Geräte */
@media (max-width: 360px){
    .ch-share-horizontal .ch-share-btn,
    .ch-share-vertical .ch-share-btn {
        min-width: 40px;
        padding: 10px;
    }
}
