/* ===========================
   CariTrav Social Share Modal
   Caribbean-themed styling
   =========================== */

/* Modal Container */
.share-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 10000;
    display: none;
    align-items: center;
    justify-content: center;
}

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

.share-modal-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    cursor: pointer;
}

.share-modal-content {
    position: relative;
    background: #ffffff;
    border-radius: 20px;
    padding: 32px;
    max-width: 480px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.share-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #f3f4f6;
    border: none;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    color: #6b7280;
    font-size: 16px;
}

.share-modal-close:hover {
    background: #e5e7eb;
    transform: rotate(90deg);
    color: #374151;
}

/* Caribbean Header */
.share-header {
    text-align: center;
    margin-bottom: 28px;
}

.share-icon-caribbean {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, #f97316 0%, #ea580c 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: white;
    font-size: 24px;
    box-shadow: 0 4px 14px rgba(249, 115, 22, 0.4);
}

.share-header h3 {
    font-size: 24px;
    font-weight: 700;
    color: #1f2937;
    margin: 0 0 8px 0;
}

.share-tagline {
    color: #6b7280;
    font-size: 15px;
    margin: 0;
}

/* Share Platform Buttons */
.share-platforms {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    margin-bottom: 24px;
}

.share-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    background: #ffffff;
    cursor: pointer;
    transition: all 0.2s;
}

.share-btn i {
    font-size: 24px;
    transition: transform 0.2s;
}

.share-btn span {
    font-size: 12px;
    font-weight: 600;
    color: #4b5563;
}

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

.share-btn:hover i {
    transform: scale(1.1);
}

/* Platform-specific colors */
.share-facebook i { color: #1877f2; }
.share-facebook:hover {
    border-color: #1877f2;
    background: #f0f7ff;
}

.share-twitter i { color: #000000; }
.share-twitter:hover {
    border-color: #000000;
    background: #f5f5f5;
}

.share-whatsapp i { color: #25d366; }
.share-whatsapp:hover {
    border-color: #25d366;
    background: #f0fdf4;
}

.share-instagram i {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.share-instagram:hover {
    border-color: #e1306c;
    background: linear-gradient(135deg, #fdf2f8 0%, #fce7f3 100%);
}

.share-tiktok i { color: #000000; }
.share-tiktok:hover {
    border-color: #000000;
    background: linear-gradient(135deg, #f5f5f5 0%, #e5f8f8 100%);
}
.share-tiktok:hover i {
    color: #25f4ee;
    text-shadow: 2px 0 #fe2c55;
}

.share-pinterest i { color: #e60023; }
.share-pinterest:hover {
    border-color: #e60023;
    background: #fff5f5;
}

.share-email i { color: #f97316; }
.share-email:hover {
    border-color: #f97316;
    background: #fff7ed;
}

.share-copy i { color: #6366f1; }
.share-copy:hover {
    border-color: #6366f1;
    background: #f5f3ff;
}

/* Message Preview */
.share-message-preview {
    background: #f9fafb;
    border-radius: 12px;
    padding: 16px;
    margin-bottom: 20px;
}

.share-message-preview label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.share-message-preview select {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    margin-bottom: 12px;
    cursor: pointer;
    background: white;
    color: #374151;
}

.share-message-preview select:focus {
    outline: none;
    border-color: #f97316;
    box-shadow: 0 0 0 3px rgba(249, 115, 22, 0.1);
}

.share-preview-text {
    font-size: 14px;
    color: #4b5563;
    line-height: 1.6;
    padding: 12px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

/* Sustainability Badge */
.share-sustainability-badge {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px;
    background: linear-gradient(135deg, #ecfdf5 0%, #d1fae5 100%);
    border-radius: 10px;
    color: #065f46;
    font-size: 13px;
    font-weight: 500;
}

.share-sustainability-badge i {
    color: #10b981;
}

/* Referral Info */
.share-referral-info {
    margin-top: 16px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #fff7ed 0%, #ffedd5 100%);
    border-radius: 10px;
    text-align: center;
}

.share-referral-info p {
    margin: 0;
    font-size: 13px;
    color: #9a3412;
}

.share-referral-info strong {
    color: #c2410c;
}

/* Copy success toast */
.copy-success-toast {
    position: fixed;
    bottom: 24px;
    left: 50%;
    transform: translateX(-50%);
    background: #065f46;
    color: white;
    padding: 12px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    animation: toastSlideUp 0.3s ease-out;
    z-index: 10001;
}

@keyframes toastSlideUp {
    from {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
}

.copy-success-toast.fade-out {
    animation: toastFadeOut 0.3s ease-out forwards;
}

@keyframes toastFadeOut {
    from {
        opacity: 1;
        transform: translateX(-50%) translateY(0);
    }
    to {
        opacity: 0;
        transform: translateX(-50%) translateY(20px);
    }
}

/* Post-booking celebration mode */
.share-modal.celebration .share-icon-caribbean {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    box-shadow: 0 4px 14px rgba(16, 185, 129, 0.4);
}

.share-modal.celebration .share-header h3 {
    color: #065f46;
}

/* Loading state */
.share-btn.loading {
    opacity: 0.6;
    pointer-events: none;
}

.share-btn.loading i {
    animation: spin 1s linear infinite;
}

@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Mobile responsive */
@media (max-width: 480px) {
    .share-platforms {
        grid-template-columns: repeat(2, 1fr);
    }

    .share-modal-content {
        padding: 24px 20px;
        margin: 16px;
        max-height: calc(100vh - 32px);
    }

    .share-header h3 {
        font-size: 20px;
    }

    .share-icon-caribbean {
        width: 56px;
        height: 56px;
        font-size: 20px;
    }

    .share-btn {
        padding: 14px 10px;
    }

    .share-btn i {
        font-size: 20px;
    }
}

/* Dark mode support (future) */
@media (prefers-color-scheme: dark) {
    /* Can be enabled when dark mode is implemented */
}
