/**
 * Violet Glossary - Share Panel Styles
 *
 * Clean, professional styling for physician sharing features.
 */

/* ============================================
   SHARE PANEL CONTAINER
   ============================================ */

.vg-share-panel {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, sans-serif;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    padding: 20px;
    margin: 30px 0;
    position: relative;
}

.vg-share-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 16px;
}

.vg-share-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: #6366f1;
    color: #fff;
    border-radius: 8px;
}

.vg-share-title {
    font-size: 16px;
    font-weight: 600;
    color: #1e293b;
}

/* ============================================
   SHARE ACTION BUTTONS
   ============================================ */

.vg-share-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.vg-share-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #475569;
    cursor: pointer;
    transition: all 0.2s ease;
}

.vg-share-btn:hover {
    background: #f8fafc;
    border-color: #cbd5e1;
    color: #1e293b;
}

.vg-share-btn:active {
    transform: scale(0.98);
}

.vg-share-btn svg {
    flex-shrink: 0;
    color: #64748b;
}

.vg-share-btn:hover svg {
    color: #6366f1;
}

.vg-share-btn-primary {
    background: #6366f1;
    border-color: #6366f1;
    color: #fff;
}

.vg-share-btn-primary:hover {
    background: #4f46e5;
    border-color: #4f46e5;
    color: #fff;
}

.vg-share-btn-primary svg {
    color: #fff;
}

/* ============================================
   PREVIEW PANEL
   ============================================ */

.vg-share-preview {
    margin-top: 16px;
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow: hidden;
    opacity: 0;
    transform: translateY(-10px);
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.vg-share-preview.visible {
    opacity: 1;
    transform: translateY(0);
}

.vg-share-preview-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.vg-share-preview-close {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    background: transparent;
    border: none;
    border-radius: 4px;
    font-size: 18px;
    color: #94a3b8;
    cursor: pointer;
    transition: all 0.2s;
}

.vg-share-preview-close:hover {
    background: #e2e8f0;
    color: #475569;
}

.vg-share-preview-content {
    margin: 0;
    padding: 16px;
    font-family: 'SF Mono', Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
    font-size: 13px;
    line-height: 1.6;
    color: #334155;
    background: #fff;
    white-space: pre-wrap;
    word-wrap: break-word;
    max-height: 300px;
    overflow-y: auto;
}

.vg-share-preview .vg-share-btn-primary {
    margin: 0 16px 16px;
    width: calc(100% - 32px);
    justify-content: center;
}

/* ============================================
   TOAST NOTIFICATION
   ============================================ */

.vg-share-toast {
    position: absolute;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%) translateY(10px);
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 12px 20px;
    background: #10b981;
    color: #fff;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
    opacity: 0;
    transition: opacity 0.2s ease, transform 0.2s ease;
    z-index: 100;
}

.vg-share-toast.visible {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.vg-share-toast svg {
    flex-shrink: 0;
}

/* ============================================
   RESPONSIVE
   ============================================ */

@media screen and (max-width: 600px) {
    .vg-share-panel {
        padding: 16px;
    }

    .vg-share-actions {
        flex-direction: column;
    }

    .vg-share-btn {
        width: 100%;
        justify-content: center;
    }

    .vg-share-toast {
        left: 16px;
        right: 16px;
        transform: translateX(0) translateY(10px);
        width: auto;
    }

    .vg-share-toast.visible {
        transform: translateX(0) translateY(0);
    }
}

/* ============================================
   DARK MODE SUPPORT
   ============================================ */

@media (prefers-color-scheme: dark) {
    .vg-share-panel.dark-mode {
        background: linear-gradient(135deg, #1e293b 0%, #0f172a 100%);
        border-color: #334155;
    }

    .vg-share-panel.dark-mode .vg-share-title {
        color: #f1f5f9;
    }

    .vg-share-panel.dark-mode .vg-share-btn {
        background: #1e293b;
        border-color: #334155;
        color: #cbd5e1;
    }

    .vg-share-panel.dark-mode .vg-share-btn:hover {
        background: #334155;
        color: #f1f5f9;
    }

    .vg-share-panel.dark-mode .vg-share-preview {
        background: #1e293b;
        border-color: #334155;
    }

    .vg-share-panel.dark-mode .vg-share-preview-header {
        background: #0f172a;
        border-color: #334155;
    }

    .vg-share-panel.dark-mode .vg-share-preview-content {
        background: #1e293b;
        color: #e2e8f0;
    }
}

/* ============================================
   PRINT STYLES
   ============================================ */

@media print {
    .vg-share-panel {
        display: none;
    }
}
