/**
 * Rumour Share Modal
 * Matches LifeList standard modal pattern
 * Social media sharing interface
 */

/* Modal Overlay (Standard Pattern) */
#rumourShareModal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 100010;
    justify-content: center;
    align-items: center;
}

#rumourShareModal.active {
    display: flex;
}

/* Modal Content */
#rumourShareModal .modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow: hidden;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

/* Modal Header */
#rumourShareModal .modal-header {
    padding: 20px 30px;
    border-bottom: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

#rumourShareModal .modal-header h2 {
    font-size: 20px;
    font-weight: 700;
    color: #111827;
    margin: 0;
}

#rumourShareModal .modal-close {
    background: #f3f4f6;
    border: none;
    border-radius: 50%;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 18px;
    color: #6b7280;
    padding: 0;
}

#rumourShareModal .modal-close:hover {
    background: #e5e7eb;
    color: #111827;
}

/* Modal Body */
#rumourShareModal .modal-body {
    padding: 30px;
    overflow-y: auto;
    max-height: calc(90vh - 160px);
}

/* Preview Section */
.rumour-share-preview {
    margin-bottom: 32px;
    text-align: center;
}

.rumour-share-preview-label {
    font-size: 14px;
    font-weight: 600;
    color: #6b7280;
    margin-bottom: 16px;
}

.rumour-share-preview-image {
    max-width: 300px;
    width: 100%;
    aspect-ratio: 9/16;
    border-radius: 12px;
    overflow: hidden;
    margin: 0 auto;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.rumour-share-preview-image img,
.rumour-share-preview-image video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Platform Selection */
.rumour-platform-selection {
    margin-bottom: 24px;
}

.rumour-platform-label {
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 12px;
}

.rumour-platforms {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 12px;
}

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

.rumour-platform-btn:hover {
    border-color: #1C2E3D;
    background: #f9fafb;
}

.rumour-platform-btn.active {
    border-color: #1C2E3D;
    background: #f0f4ff;
}

.rumour-platform-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
}

.rumour-platform-icon.instagram {
    background: linear-gradient(45deg, #f09433 0%, #e6683c 25%, #dc2743 50%, #cc2366 75%, #bc1888 100%);
    color: white;
}

.rumour-platform-icon.facebook {
    background: #1877f2;
    color: white;
}

.rumour-platform-icon.twitter {
    background: #1da1f2;
    color: white;
}

.rumour-platform-name {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}

/* Share Options */
.rumour-share-options {
    margin-bottom: 24px;
}

.rumour-option-group {
    margin-bottom: 20px;
}

.rumour-option-label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    margin-bottom: 8px;
}

.rumour-option-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
}

.rumour-option-textarea {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    resize: vertical;
    min-height: 80px;
}

.rumour-option-checkbox {
    display: flex;
    align-items: center;
    gap: 8px;
}

.rumour-option-checkbox input[type="checkbox"] {
    width: 18px;
    height: 18px;
    cursor: pointer;
}

.rumour-option-checkbox label {
    font-size: 14px;
    color: #374151;
    cursor: pointer;
}

/* Share Status */
.rumour-share-status {
    padding: 16px;
    border-radius: 8px;
    margin-bottom: 24px;
    display: none;
}

.rumour-share-status.success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #6ee7b7;
}

.rumour-share-status.error {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fca5a5;
}

.rumour-share-status.active {
    display: block;
}

/* Share Actions */
.rumour-share-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
}

.rumour-btn-cancel,
.rumour-btn-share {
    padding: 10px 24px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.rumour-btn-cancel {
    background: #f3f4f6;
    color: #374151;
}

.rumour-btn-cancel:hover {
    background: #e5e7eb;
}

.rumour-btn-share {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: white;
}

.rumour-btn-share:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(139, 92, 246, 0.4);
}

.rumour-btn-share:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* OAuth Connect */
.rumour-oauth-notice {
    padding: 16px;
    background: #fffbeb;
    border: 1px solid #fde68a;
    border-radius: 8px;
    margin-bottom: 24px;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.rumour-oauth-notice i {
    color: #d97706;
    font-size: 20px;
}

.rumour-oauth-notice-content {
    flex: 1;
}

.rumour-oauth-notice-title {
    font-size: 14px;
    font-weight: 600;
    color: #92400e;
    margin-bottom: 4px;
}

.rumour-oauth-notice-text {
    font-size: 13px;
    color: #78350f;
}

.rumour-btn-connect {
    margin-top: 12px;
    padding: 8px 16px;
    background: #1C2E3D;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.rumour-btn-connect:hover {
    background: #0f1c29;
}

/* Loading State */
.rumour-loading {
    display: none;
    text-align: center;
    padding: 20px;
}

.rumour-loading.active {
    display: block;
}

.rumour-spinner {
    width: 40px;
    height: 40px;
    margin: 0 auto 12px;
    border: 4px solid #f3f4f6;
    border-top-color: #1C2E3D;
    border-radius: 50%;
    animation: rumour-spin 0.8s linear infinite;
}

@keyframes rumour-spin {
    to { transform: rotate(360deg); }
}

.rumour-loading-text {
    font-size: 14px;
    color: #6b7280;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    #rumourShareModal .modal-content {
        width: 95%;
        max-height: 95vh;
    }
    
    #rumourShareModal .modal-header {
        padding: 15px 20px;
    }
    
    #rumourShareModal .modal-header h2 {
        font-size: 18px;
    }
    
    #rumourShareModal .modal-body {
        padding: 20px;
    }
    
    .rumour-share-preview-image {
        max-width: 240px;
    }
    
    .rumour-platforms {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .rumour-share-actions {
        flex-direction: column;
    }
    
    .rumour-btn-cancel,
    .rumour-btn-share {
        width: 100%;
    }
}
