/* ============================================
   QUOTE SHARING SYSTEM
   ============================================ */

/* ========================================
   SHARE POPUP
   ======================================== */

.quote-share-popup {
    position: absolute;
    display: none;
    flex-direction: row;
    gap: 0.5rem;
    background: white;
    padding: 0.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(139, 92, 246, 0.1);
    z-index: 10000;
    transform: translateX(-50%) translateY(-10px);
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.quote-share-popup.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.quote-share-popup::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 8px solid transparent;
    border-right: 8px solid transparent;
    border-top: 8px solid white;
}

/* ========================================
   SHARE BUTTONS
   ======================================== */

.quote-share-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 2px solid rgba(139, 92, 246, 0.1);
    background: white;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #718096;
}

.quote-share-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.quote-share-btn[data-platform="twitter"]:hover {
    background: #1DA1F2;
    color: white;
    border-color: #1DA1F2;
}

.quote-share-btn[data-platform="facebook"]:hover {
    background: #1877F2;
    color: white;
    border-color: #1877F2;
}

.quote-share-btn[data-platform="linkedin"]:hover {
    background: #0A66C2;
    color: white;
    border-color: #0A66C2;
}

.quote-share-btn[data-platform="copy"]:hover {
    background: #10B981;
    color: white;
    border-color: #10B981;
}

.generate-card-btn:hover {
    background: linear-gradient(135deg, #8B5CF6, #EC4899);
    color: white;
    border-color: transparent;
}

/* ========================================
   QUOTE CARD MODAL
   ======================================== */

.quote-card-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
    opacity: 0;
    transition: opacity 0.3s ease;
    backdrop-filter: blur(4px);
}

.quote-card-modal.show {
    opacity: 1;
}

.quote-card-container {
    background: white;
    border-radius: 20px;
    padding: 2rem;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
    transform: scale(0.9);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.quote-card-modal.show .quote-card-container {
    transform: scale(1);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: none;
    background: rgba(239, 68, 68, 0.1);
    color: #EF4444;
    font-size: 1.5rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #EF4444;
    color: white;
    transform: rotate(90deg);
}

.quote-card-container h3 {
    margin: 0 0 1.5rem 0;
    font-size: 1.5rem;
    font-weight: 700;
    color: #1a202c;
}

/* ========================================
   QUOTE CARD PREVIEW
   ======================================== */

.quote-card-preview {
    background: linear-gradient(135deg, #8B5CF6, #EC4899);
    border-radius: 16px;
    padding: 3rem 2rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 12px 40px rgba(139, 92, 246, 0.3);
}

.card-content {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.card-quote {
    font-size: 1.5rem;
    font-weight: 600;
    line-height: 1.6;
    color: white;
    font-style: italic;
    text-align: center;
}

.card-source {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    align-items: center;
    padding-top: 1.5rem;
    border-top: 2px solid rgba(255, 255, 255, 0.2);
}

.card-logo {
    font-size: 1.25rem;
    font-weight: 700;
    color: white;
}

.card-title {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.9);
    text-align: center;
}

/* ========================================
   CARD ACTIONS
   ======================================== */

.card-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
}

.card-actions button {
    flex: 1;
    padding: 1rem;
    border-radius: 12px;
    border: 2px solid rgba(139, 92, 246, 0.2);
    background: white;
    color: #8B5CF6;
    font-weight: 700;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: all 0.2s ease;
}

.card-actions button:hover {
    background: linear-gradient(135deg, #8B5CF6, #EC4899);
    color: white;
    border-color: transparent;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.3);
}

.card-hint {
    margin: 0;
    font-size: 0.8125rem;
    color: #718096;
    text-align: center;
    font-style: italic;
}

/* ========================================
   NOTIFICATION
   ======================================== */

.quote-notification {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%) translateY(100px);
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    z-index: 10002;
    font-weight: 600;
    opacity: 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.quote-notification.show {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}

.quote-notification-success {
    color: #10B981;
    border-left: 4px solid #10B981;
}

.quote-notification-error {
    color: #EF4444;
    border-left: 4px solid #EF4444;
}

/* ========================================
   SELECTION HIGHLIGHT
   ======================================== */

::selection {
    background: rgba(139, 92, 246, 0.3);
    color: inherit;
}

::-moz-selection {
    background: rgba(139, 92, 246, 0.3);
    color: inherit;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */

@media (max-width: 768px) {
    .quote-share-popup {
        position: fixed;
        bottom: 1rem;
        left: 50%;
        top: auto !important;
        transform: translateX(-50%) translateY(100px);
    }

    .quote-share-popup.show {
        transform: translateX(-50%) translateY(0);
    }

    .quote-share-popup::after {
        display: none;
    }

    .quote-card-container {
        padding: 1.5rem;
    }

    .card-quote {
        font-size: 1.25rem;
    }

    .card-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .quote-share-btn {
        width: 36px;
        height: 36px;
    }

    .quote-share-btn svg {
        width: 16px;
        height: 16px;
    }

    .quote-card-preview {
        padding: 2rem 1.5rem;
    }

    .card-quote {
        font-size: 1.125rem;
    }
}

/* ========================================
   ACCESSIBILITY
   ======================================== */

.quote-share-btn:focus,
.modal-close:focus,
.card-actions button:focus {
    outline: 2px solid #8B5CF6;
    outline-offset: 2px;
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
    .quote-share-popup,
    .quote-card-modal,
    .quote-card-container,
    .quote-notification,
    .quote-share-btn,
    .modal-close,
    .card-actions button {
        transition: none;
    }
}

