/**
 * Share Buttons Styles
 * 
 * Styles for the social sharing modal and buttons
 */

/* Modal */
.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s;
}

.share-modal--visible {
    opacity: 1;
    visibility: visible;
}

.share-modal__overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(4px);
}

.share-modal__content {
    position: relative;
    width: 90%;
    max-width: 400px;
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.share-modal--visible .share-modal__content {
    transform: scale(1);
}

.share-modal__header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 20px 12px;
    border-bottom: 1px solid #e5e7eb;
}

.share-modal__title {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #111827;
}

.share-modal__close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    padding: 0;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: #6b7280;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
}

.share-modal__close:hover {
    background: #f3f4f6;
    color: #111827;
}

.share-modal__close:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.share-modal__body {
    padding: 16px 20px 20px;
}

/* Share Buttons */
.share-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
}

.share-button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 10px;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    color: #111827;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.share-button:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.share-button:active {
    transform: translateY(0);
}

.share-button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

.share-button svg {
    flex-shrink: 0;
    width: 20px;
    height: 20px;
}

.share-button span {
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Platform-specific colors */
.share-button--vk {
    color: #0077ff;
}

.share-button--vk:hover {
    background: #0077ff;
    border-color: #0077ff;
    color: #ffffff;
}

.share-button--telegram {
    color: #0088cc;
}

.share-button--telegram:hover {
    background: #0088cc;
    border-color: #0088cc;
    color: #ffffff;
}

.share-button--max {
    color: #0066ff;
}

.share-button--max:hover {
    background: #0066ff;
    border-color: #0066ff;
    color: #ffffff;
}

.share-button--copy {
    color: #6b7280;
}

.share-button--copy:hover {
    background: #374151;
    border-color: #374151;
    color: #ffffff;
}

/* Toast notification */
.share-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    padding: 12px 24px;
    background: #1a1a1a;
    color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    font-size: 14px;
    font-weight: 500;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.3s ease, transform 0.3s ease;
}

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

.share-toast--error {
    background: #dc2626;
}

/* Dark theme */
[data-theme="dark"] .share-modal__content {
    background: #1f2937;
}

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

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

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

[data-theme="dark"] .share-modal__close:hover {
    background: #374151;
    color: #f9fafb;
}

[data-theme="dark"] .share-button {
    background: #374151;
    border-color: #4b5563;
    color: #f9fafb;
}

[data-theme="dark"] .share-button:hover {
    background: #4b5563;
    border-color: #6b7280;
}

/* Mobile optimizations */
@media (max-width: 768px) {
    .share-modal__content {
        width: 95%;
        max-width: none;
        margin: 16px;
    }
    
    .share-buttons {
        grid-template-columns: 1fr;
    }
    
    .share-button {
        padding: 18px 16px;
    }
}

/* Tablet */
@media (min-width: 769px) and (max-width: 1024px) {
    .share-modal__content {
        max-width: 420px;
    }
}
