/**
 * Social Share Frontend Styles
 * Styling for share buttons, modal, and privacy controls
 *
 * @package AI_Tarot_Reader
 * @subpackage Extensions/Social_Share
 * @since 3.7.0
 */

/* ========================================
   Privacy Toggle
   ======================================== */

.tarot-privacy-toggle {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 15px 20px;
    margin: 20px 0;
}

.tarot-privacy-toggle .privacy-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    margin: 0;
}

.tarot-privacy-toggle input[type="checkbox"] {
    margin-right: 10px;
    cursor: pointer;
}

.tarot-privacy-toggle .privacy-text {
    display: flex;
    align-items: center;
    font-size: 15px;
    font-weight: 500;
    color: #333;
}

.tarot-privacy-toggle .dashicons {
    color: #666;
    margin-right: 5px;
}

.tarot-privacy-toggle .privacy-help-text {
    margin: 10px 0 0 25px;
    font-size: 13px;
    color: #666;
    font-style: italic;
}

/* ========================================
   Share Section
   ======================================== */

.tarot-social-share-wrapper {
    margin: 30px 0 20px;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 12px;
    text-align: center;
}

.tarot-social-share-wrapper .share-section-label {
    color: #fff;
    font-size: 20px;
    font-weight: 600;
    margin: 0 0 20px 0;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* ========================================
   Share Buttons
   ======================================== */

.tarot-share-buttons {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
}

.tarot-share-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 12px 20px;
    background: #fff;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    font-weight: 500;
    color: #333;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

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

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

.tarot-share-btn .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

.tarot-share-btn .share-icon-custom {
    width: 20px;
    height: 20px;
    margin-right: 8px;
}

/* Button Styles */
.tarot-social-share-wrapper[data-button-style="icons_only"] .tarot-share-btn {
    padding: 12px;
}

.tarot-social-share-wrapper[data-button-style="icons_only"] .share-btn-text {
    display: none;
}

.tarot-social-share-wrapper[data-button-style="text_only"] .tarot-share-btn .dashicons,
.tarot-social-share-wrapper[data-button-style="text_only"] .tarot-share-btn .share-icon-custom {
    display: none;
}

/* Button Sizes */
.tarot-social-share-wrapper[data-button-size="small"] .tarot-share-btn {
    padding: 8px 14px;
    font-size: 12px;
}

.tarot-social-share-wrapper[data-button-size="small"] .tarot-share-btn .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.tarot-social-share-wrapper[data-button-size="large"] .tarot-share-btn {
    padding: 16px 28px;
    font-size: 16px;
}

.tarot-social-share-wrapper[data-button-size="large"] .tarot-share-btn .dashicons {
    font-size: 24px;
    width: 24px;
    height: 24px;
}

/* Network Colors - Colored Style */
.tarot-social-share-wrapper[data-icon-style="colored"] .tarot-share-facebook:hover {
    background: #1877f2;
    color: #fff;
}

.tarot-social-share-wrapper[data-icon-style="colored"] .tarot-share-twitter:hover {
    background: #1da1f2;
    color: #fff;
}

.tarot-social-share-wrapper[data-icon-style="colored"] .tarot-share-pinterest:hover {
    background: #bd081c;
    color: #fff;
}

.tarot-social-share-wrapper[data-icon-style="colored"] .tarot-share-linkedin:hover {
    background: #0a66c2;
    color: #fff;
}

.tarot-social-share-wrapper[data-icon-style="colored"] .tarot-share-whatsapp:hover {
    background: #25d366;
    color: #fff;
}

.tarot-social-share-wrapper[data-icon-style="colored"] .tarot-share-reddit:hover {
    background: #ff4500;
    color: #fff;
}

.tarot-social-share-wrapper[data-icon-style="colored"] .tarot-share-email:hover {
    background: #666;
    color: #fff;
}

.tarot-social-share-wrapper[data-icon-style="colored"] .tarot-share-copy:hover {
    background: #333;
    color: #fff;
}

.tarot-social-share-wrapper[data-icon-style="colored"] .tarot-share-copy.copied {
    background: #10b981;
    color: #fff;
}

/* Monochrome Style */
.tarot-social-share-wrapper[data-icon-style="monochrome"] .tarot-share-btn {
    background: #333;
    color: #fff;
}

.tarot-social-share-wrapper[data-icon-style="monochrome"] .tarot-share-btn:hover {
    background: #555;
}

/* Outlined Style */
.tarot-social-share-wrapper[data-icon-style="outlined"] .tarot-share-btn {
    background: transparent;
    border: 2px solid #fff;
    color: #fff;
}

.tarot-social-share-wrapper[data-icon-style="outlined"] .tarot-share-btn:hover {
    background: rgba(255, 255, 255, 0.1);
}

/* ========================================
   Share Preview Modal
   ======================================== */

.tarot-share-modal-overlay {
    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: 999999;
    animation: fadeIn 0.2s ease;
}

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

.tarot-share-modal {
    background: #fff;
    border-radius: 12px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.3s ease;
}

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

.tarot-share-modal.loading {
    padding: 40px;
    text-align: center;
}

.modal-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    margin: 0 auto 20px;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px 24px;
    border-bottom: 1px solid #e5e7eb;
}

.modal-header h3 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

.modal-close {
    background: none;
    border: none;
    font-size: 32px;
    line-height: 1;
    cursor: pointer;
    color: #999;
    padding: 0;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: #f3f4f6;
    color: #333;
}

.modal-body {
    padding: 24px;
}

.share-image-preview {
    margin-bottom: 20px;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.share-image-preview img {
    width: 100%;
    height: auto;
    display: block;
}

/* Formatted Preview Section */
.share-preview-formatted {
    margin-bottom: 20px;
}

.share-preview-formatted label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
    font-size: 14px;
}

.formatted-preview {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 6px;
    padding: 15px;
    font-size: 14px;
    line-height: 1.6;
    color: #495057;
    word-wrap: break-word;
}

.formatted-preview a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.2s ease;
}

.formatted-preview a:hover {
    color: #5568d3;
    text-decoration: underline;
}

.share-text-editor label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #333;
}

.share-text-editor textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #d1d5db;
    border-radius: 6px;
    font-size: 14px;
    font-family: inherit;
    resize: vertical;
    transition: border-color 0.2s ease;
}

.share-text-editor textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.share-text-editor .char-count {
    margin-top: 8px;
    font-size: 13px;
    color: #666;
    text-align: right;
}

.modal-footer {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding: 20px 24px;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

.modal-footer .tarot-button {
    padding: 10px 20px;
    border-radius: 6px;
    border: none;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.modal-footer .tarot-button.secondary {
    background: #fff;
    color: #666;
    border: 1px solid #d1d5db;
}

.modal-footer .tarot-button.secondary:hover {
    background: #f9fafb;
}

.modal-footer .tarot-button.primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}

.modal-footer .tarot-button.primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
}

/* ========================================
   Responsive Design
   ======================================== */

@media (max-width: 768px) {
    .tarot-share-buttons {
        gap: 8px;
    }
    
    .tarot-share-btn {
        padding: 10px 16px;
        font-size: 13px;
    }
    
    .tarot-share-modal {
        width: 95%;
        max-height: 95vh;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 16px;
    }
    
    .modal-footer {
        flex-direction: column;
    }
    
    .modal-footer .tarot-button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .tarot-social-share-wrapper {
        padding: 15px;
    }
    
    .tarot-social-share-wrapper .share-section-label {
        font-size: 18px;
    }
    
    .tarot-share-buttons {
        gap: 6px;
    }
    
    .tarot-share-btn {
        padding: 8px 12px;
        font-size: 12px;
    }
    
    .tarot-social-share-wrapper[data-button-style="icons_text"] .share-btn-text {
        display: none;
    }
    
    .tarot-social-share-wrapper[data-button-style="icons_text"] .tarot-share-btn {
        padding: 10px;
    }
}
