/**
 * Quote Success Share Modal - Styling
 * Modern, ren design med animationer och responsivitet
 */

/* ==================== OVERLAY & MODAL ==================== */

.quote-success-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    animation: fadeIn 0.3s ease-out;
    padding: 1rem;
}

.quote-success-modal {
    background: white;
    border-radius: 16px;
    max-width: 600px;
    width: 100%;
    padding: 2.5rem;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease-out;
    max-height: 90vh;
    overflow-y: auto;
}

/* ==================== ANIMATIONER ==================== */

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* ==================== SUCCESS HEADER ==================== */

.success-header {
    text-align: center;
    margin-bottom: 2rem;
}

.checkmark-icon {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-bottom: 1rem;
    animation: scaleIn 0.5s ease-out 0.2s backwards;
}

@keyframes scaleIn {
    from {
        transform: scale(0);
    }
    to {
        transform: scale(1);
    }
}

.success-header h2 {
    font-size: 1.75rem;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
}

.success-header p {
    font-size: 1rem;
    color: #6b7280;
    margin: 0;
}

/* ==================== DIVIDER ==================== */

.divider {
    border: none;
    border-top: 1px solid #e5e7eb;
    margin: 2rem 0;
}

/* ==================== SHARE SECTION ==================== */

.share-section {
    margin-bottom: 2rem;
}

.share-section h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1f2937;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.share-section h3 svg {
    color: #0ea5e9;
}

.share-section > p {
    font-size: 0.95rem;
    color: #6b7280;
    margin: 0 0 1.5rem 0;
}

/* ==================== SHARE PREVIEW ==================== */

.share-preview {
    margin-bottom: 1.5rem;
}

.share-preview textarea {
    width: 100%;
    padding: 1rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #1f2937;
    resize: vertical;
    min-height: 80px;
    transition: border-color 0.2s;
}

.share-preview textarea:focus {
    outline: none;
    border-color: #0ea5e9;
}

.share-preview small {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #9ca3af;
    font-style: italic;
}

/* ==================== SOCIAL BUTTONS ==================== */

.social-buttons {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.social-buttons button {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 0.95rem;
    font-weight: 500;
    color: white;
    cursor: pointer;
    transition: all 0.2s;
}

.social-buttons button:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

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

.social-buttons button i {
    font-size: 1.1rem;
}

/* Facebook */
.btn-facebook {
    background: #1877f2;
}

.btn-facebook:hover {
    background: #1664d8;
}

/* LinkedIn */
.btn-linkedin {
    background: #0a66c2;
}

.btn-linkedin:hover {
    background: #004e99;
}

/* Twitter/X */
.btn-twitter {
    background: #000000;
}

.btn-twitter:hover {
    background: #1a1a1a;
}

/* Email */
.btn-email {
    background: #6b7280;
}

.btn-email:hover {
    background: #4b5563;
}

/* Copy */
.btn-copy {
    background: #10b981;
}

.btn-copy:hover {
    background: #059669;
}

/* ==================== MODAL FOOTER ==================== */

.modal-footer {
    display: flex;
    gap: 1rem;
    justify-content: space-between;
    margin-top: 2rem;
}

.modal-footer button {
    flex: 1;
    padding: 0.875rem 1.5rem;
    border: none;
    border-radius: 8px;
    font-family: inherit;
    font-size: 1rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-skip {
    background: #f3f4f6;
    color: #6b7280;
}

.btn-skip:hover {
    background: #e5e7eb;
    color: #4b5563;
}

.btn-dashboard {
    background: #2d3748;
    color: white;
}

.btn-dashboard:hover {
    background: #1f2937;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(45, 55, 72, 0.3);
}

.btn-dashboard:active {
    transform: translateY(0);
}

/* ==================== TOAST NOTIFICATIONS ==================== */

.quote-success-toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
    font-size: 0.95rem;
    font-weight: 500;
    z-index: 10000;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s ease-out;
}

.quote-success-toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast-success {
    background: #10b981;
    color: white;
}

.toast-error {
    background: #ef4444;
    color: white;
}

.toast-warning {
    background: #f59e0b;
    color: white;
}

.toast-info {
    background: #0ea5e9;
    color: white;
}

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

@media (max-width: 768px) {
    .quote-success-modal {
        padding: 1.5rem;
        border-radius: 12px;
    }

    .success-header h2 {
        font-size: 1.5rem;
    }

    .share-section h3 {
        font-size: 1.1rem;
    }

    .social-buttons {
        grid-template-columns: 1fr;
    }

    .modal-footer {
        flex-direction: column-reverse;
    }

    .modal-footer button {
        width: 100%;
    }

    .quote-success-toast {
        left: 1rem;
        right: 1rem;
        bottom: 1rem;
    }
}

@media (max-width: 480px) {
    .quote-success-overlay {
        padding: 0.5rem;
    }

    .quote-success-modal {
        padding: 1.25rem;
        max-height: 95vh;
    }

    .success-header h2 {
        font-size: 1.35rem;
    }

    .checkmark-icon svg {
        width: 48px;
        height: 48px;
    }

    .share-preview textarea {
        padding: 0.75rem;
        font-size: 0.9rem;
    }

    .social-buttons button {
        padding: 0.65rem 0.85rem;
        font-size: 0.9rem;
    }

    .modal-footer button {
        padding: 0.75rem 1.25rem;
        font-size: 0.95rem;
    }
}

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

.quote-success-modal:focus-visible {
    outline: 3px solid #0ea5e9;
    outline-offset: 2px;
}

.social-buttons button:focus-visible,
.modal-footer button:focus-visible {
    outline: 3px solid #0ea5e9;
    outline-offset: 2px;
}

/* Dark mode support (framtida) */
@media (prefers-color-scheme: dark) {
    /* Kan aktiveras senare om dark mode implementeras */
}
