/**
 * ================================================================
 * SCHNEIDERLEICHT - Share Modal (Airbnb Style)
 * ================================================================
 * Elegantes Teilen-Modal für Social Sharing
 * ================================================================
 */

/* Modal Overlay */
.share-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.share-modal.active {
    display: flex;
}

/* Modal Content */
.share-modal__content {
    background: white;
    border-radius: 12px;
    max-width: 568px;
    width: 100%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 8px 28px rgba(0, 0, 0, 0.28);
    animation: shareModalIn 0.2s ease-out;
}

@keyframes shareModalIn {
    from {
        opacity: 0;
        transform: scale(0.95) translateY(10px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

/* Modal Header */
.share-modal__header {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px 24px;
    border-bottom: 1px solid #ebebeb;
    position: relative;
}

.share-modal__close {
    position: absolute;
    left: 16px;
    top: 50%;
    transform: translateY(-50%);
    width: 32px;
    height: 32px;
    border: none;
    background: transparent;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.share-modal__close:hover {
    background: #f7f7f7;
}

.share-modal__close .material-icons-outlined {
    font-size: 18px;
    color: #222;
}

.share-modal__title {
    font-size: 1rem;
    font-weight: 600;
    color: #222;
    margin: 0;
}

/* Modal Body */
.share-modal__body {
    padding: 24px;
}

/* Preview Card */
.share-preview {
    display: flex;
    gap: 16px;
    margin-bottom: 24px;
}

.share-preview__image {
    width: 64px;
    height: 64px;
    border-radius: 8px;
    object-fit: cover;
    flex-shrink: 0;
}

.share-preview__info {
    flex: 1;
    min-width: 0;
}

.share-preview__title {
    font-size: 0.95rem;
    font-weight: 400;
    color: #222;
    margin: 0 0 4px 0;
    line-height: 1.4;
}

.share-preview__meta {
    font-size: 0.85rem;
    color: #717171;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 4px;
}

.share-preview__rating {
    display: inline-flex;
    align-items: center;
    gap: 2px;
}

.share-preview__rating .material-icons {
    font-size: 12px;
    color: #222;
}

/* Share Options Grid */
.share-options {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

@media (max-width: 480px) {
    .share-options {
        grid-template-columns: 1fr;
    }
}

/* Share Button */
.share-btn {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 12px 16px;
    background: white;
    border: 1px solid #dddddd;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    color: #222;
    font-size: 0.95rem;
    font-weight: 400;
}

.share-btn:hover {
    background: #f7f7f7;
    border-color: #222;
}

.share-btn__icon {
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.share-btn__icon .material-icons-outlined,
.share-btn__icon .material-icons {
    font-size: 24px;
    color: #222;
}

.share-btn__icon svg {
    width: 24px;
    height: 24px;
}

.share-btn__label {
    flex: 1;
    text-align: left;
}

/* Specific Icon Colors */
.share-btn--whatsapp .share-btn__icon svg {
    fill: #25D366;
}

.share-btn--facebook .share-btn__icon svg {
    fill: #1877F2;
}

.share-btn--messenger .share-btn__icon svg {
    fill: #0084FF;
}

.share-btn--twitter .share-btn__icon svg {
    fill: #000000;
}

.share-btn--email .share-btn__icon .material-icons-outlined {
    color: #222;
}

.share-btn--copy .share-btn__icon .material-icons-outlined {
    color: #222;
}

/* Copy Success State */
.share-btn--copy.copied {
    background: #f0fdf4;
    border-color: #22c55e;
}

.share-btn--copy.copied .share-btn__label {
    color: #16a34a;
}

/* More Options Button */
.share-btn--more {
    grid-column: 1 / -1;
    justify-content: flex-start;
    border: none;
    padding: 12px 0;
}

.share-btn--more:hover {
    background: transparent;
    border: none;
}

.share-btn--more .share-btn__icon {
    width: 24px;
    height: 24px;
    background: #f7f7f7;
    border-radius: 50%;
}

/* Toast Notification */
.share-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: #222;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    z-index: 10001;
    opacity: 0;
    transition: all 0.3s ease;
    pointer-events: none;
}

.share-toast.visible {
    transform: translateX(-50%) translateY(0);
    opacity: 1;
}

/* Dark Mode */
:root[data-theme="dark"] .share-modal__content {
    background: #1a1a1a;
    border: 1px solid #333;
}

:root[data-theme="dark"] .share-modal__header {
    border-color: #333;
}

:root[data-theme="dark"] .share-modal__title {
    color: #f5f5f5;
}

:root[data-theme="dark"] .share-modal__close:hover {
    background: #2a2a2a;
}

:root[data-theme="dark"] .share-modal__close .material-icons-outlined {
    color: #f5f5f5;
}

:root[data-theme="dark"] .share-preview__title {
    color: #f5f5f5;
}

:root[data-theme="dark"] .share-preview__meta {
    color: #9ca3af;
}

:root[data-theme="dark"] .share-btn {
    background: #1a1a1a;
    border-color: #444;
    color: #f5f5f5;
}

:root[data-theme="dark"] .share-btn:hover {
    background: #2a2a2a;
    border-color: #666;
}

:root[data-theme="dark"] .share-btn__icon .material-icons-outlined,
:root[data-theme="dark"] .share-btn__icon .material-icons {
    color: #f5f5f5;
}

:root[data-theme="dark"] .share-btn--copy.copied {
    background: #052e16;
    border-color: #22c55e;
}
