/**
 * Property Page SEO & Marketing Preview System
 * Styling for preview modals, buttons, and content display
 */

/* =============================================
   ANIMATIONS
   ============================================= */

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideDown {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(20px);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

@keyframes fadeOut {
    from {
        opacity: 1;
    }
    to {
        opacity: 0;
    }
}

@keyframes spin {
    0% {
        transform: rotate(0deg);
    }
    100% {
        transform: rotate(360deg);
    }
}

/* =============================================
   MODAL STYLES
   ============================================= */

.property-preview-modal {
    display: flex !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.6) !important;
    z-index: 99999 !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 20px !important;
    overflow-y: auto !important;
}

.property-preview-modal-content {
    background: white !important;
    border-radius: 12px !important;
    width: 100% !important;
    max-width: 1100px !important;
    max-height: 90vh !important;
    overflow: auto !important;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3) !important;
    animation: slideUp 0.3s ease-out !important;
}

.property-preview-modal-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    padding: 24px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    border-radius: 12px 12px 0 0 !important;
    position: sticky !important;
    top: 0 !important;
    z-index: 10000 !important;
}

.property-preview-modal-body {
    padding: 30px !important;
    background: #f8f9fa !important;
    overflow-y: auto !important;
    max-height: calc(90vh - 100px) !important;
}

.property-preview-close-btn {
    background: rgba(255, 255, 255, 0.2) !important;
    border: 2px solid white !important;
    color: white !important;
    font-size: 28px !important;
    cursor: pointer !important;
    padding: 0 !important;
    width: 40px !important;
    height: 40px !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 50% !important;
    transition: all 0.3s !important;
}

.property-preview-close-btn:hover {
    background: rgba(255, 255, 255, 0.3) !important;
    transform: rotate(90deg) !important;
}

/* =============================================
   PREVIEW CONTENT STYLES
   ============================================= */

.property-preview-ad {
    background: white !important;
    padding: 20px !important;
    border-radius: 8px !important;
    border-left: 6px solid #667eea !important;
    margin-bottom: 24px !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08) !important;
}

.property-preview-ad-title {
    font-weight: 700 !important;
    color: #1f2937 !important;
    font-size: 1rem !important;
    margin-bottom: 16px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
}

.property-preview-ad-icon {
    width: 32px !important;
    height: 32px !important;
    border-radius: 50% !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    color: white !important;
    font-weight: 700 !important;
    font-size: 0.9rem !important;
}

.property-preview-table {
    width: 100% !important;
    border-collapse: collapse !important;
}

.property-preview-table tr {
    border-bottom: 1px solid #e0e0e0 !important;
}

.property-preview-table td {
    padding: 8px !important;
}

.property-preview-table td:first-child {
    font-weight: 700 !important;
    background: #f5f5f5 !important;
    width: 30% !important;
}

.property-preview-loading {
    text-align: center !important;
    padding: 60px 20px !important;
}

.property-preview-spinner {
    border: 5px solid #f3f3f3 !important;
    border-top: 5px solid #667eea !important;
    border-radius: 50% !important;
    width: 50px !important;
    height: 50px !important;
    animation: spin 1s linear infinite !important;
    margin: 0 auto !important;
}

.property-preview-loading-text {
    color: #666 !important;
    margin-top: 20px !important;
    font-size: 0.95rem !important;
    font-weight: 500 !important;
}

/* =============================================
   PLATFORM-SPECIFIC PREVIEW STYLES
   ============================================= */

/* Google Search Results */
.google-search-preview {
    background: white !important;
    padding: 12px !important;
    border-radius: 6px !important;
}

.google-search-title {
    color: #1a73e8 !important;
    font-weight: 600 !important;
    margin-bottom: 4px !important;
    font-size: 0.95rem !important;
    text-decoration: underline !important;
}

.google-search-url {
    color: #0d652d !important;
    font-size: 0.85rem !important;
    margin-bottom: 8px !important;
}

.google-search-description {
    color: #545454 !important;
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
}

/* Facebook Ad */
.facebook-ad-card {
    background: white !important;
    border: 1px solid #ccc !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    max-width: 400px !important;
}

.facebook-ad-image {
    width: 100% !important;
    height: 240px !important;
    object-fit: cover !important;
    background: #e0e0e0 !important;
}

.facebook-ad-content {
    padding: 12px !important;
}

.facebook-ad-title {
    font-weight: 700 !important;
    color: #050505 !important;
    font-size: 0.9rem !important;
    margin-bottom: 6px !important;
}

.facebook-ad-description {
    color: #65676b !important;
    font-size: 0.85rem !important;
    line-height: 1.4 !important;
    margin-bottom: 10px !important;
}

.facebook-ad-button {
    background: #0a66c2 !important;
    color: white !important;
    border: none !important;
    padding: 10px 16px !important;
    border-radius: 6px !important;
    font-weight: 600 !important;
    cursor: pointer !important;
    width: 100% !important;
    font-size: 0.85rem !important;
}

/* Instagram Post */
.instagram-post-image {
    width: 100% !important;
    border-radius: 8px !important;
    margin-bottom: 12px !important;
}

.instagram-post-content {
    background: white !important;
    padding: 12px !important;
    border-radius: 8px !important;
}

.instagram-caption {
    color: #262626 !important;
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
    margin-bottom: 8px !important;
}

.instagram-hashtags {
    color: #0095f6 !important;
    font-size: 0.85rem !important;
}

/* Twitter Card */
.twitter-card {
    background: white !important;
    border: 1px solid #e1e8ed !important;
    border-radius: 12px !important;
    overflow: hidden !important;
    max-width: 550px !important;
}

.twitter-card-image {
    width: 100% !important;
    height: 300px !important;
    object-fit: cover !important;
    background: #e0e0e0 !important;
}

.twitter-card-content {
    padding: 16px !important;
}

.twitter-card-title {
    font-weight: 700 !important;
    color: #0f1419 !important;
    font-size: 1rem !important;
    margin-bottom: 8px !important;
}

.twitter-card-description {
    color: #536471 !important;
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
}

/* LinkedIn Post */
.linkedin-post-card {
    background: white !important;
    border: 1px solid #d5d5d5 !important;
    border-radius: 8px !important;
    overflow: hidden !important;
    max-width: 500px !important;
}

.linkedin-post-image {
    width: 100% !important;
    height: 300px !important;
    object-fit: cover !important;
    background: #e0e0e0 !important;
}

.linkedin-post-content {
    padding: 16px !important;
}

.linkedin-post-title {
    font-weight: 700 !important;
    color: #000 !important;
    font-size: 0.95rem !important;
    margin-bottom: 8px !important;
}

.linkedin-post-description {
    color: #666 !important;
    font-size: 0.9rem !important;
    line-height: 1.5 !important;
}

/* Google Display Ad */
.google-display-ad {
    background: white !important;
    border: 1px solid #ddd !important;
    border-radius: 4px !important;
    overflow: hidden !important;
    max-width: 320px !important;
}

.google-display-ad-image {
    width: 100% !important;
    height: 250px !important;
    object-fit: cover !important;
}

.google-display-ad-content {
    padding: 10px !important;
    border-top: 1px solid #ddd !important;
}

.google-display-ad-title {
    font-weight: 700 !important;
    color: #1a73e8 !important;
    font-size: 0.8rem !important;
    margin-bottom: 4px !important;
}

.google-display-ad-description {
    color: #545454 !important;
    font-size: 0.75rem !important;
}

/* =============================================
   RESPONSIVE DESIGN
   ============================================= */

@media (max-width: 768px) {
    .property-preview-modal {
        padding: 10px !important;
    }

    .property-preview-modal-content {
        max-width: 100% !important;
        max-height: 95vh !important;
    }

    .property-preview-modal-header {
        flex-direction: column !important;
        gap: 12px !important;
        align-items: flex-start !important;
    }

    .property-preview-close-btn {
        align-self: flex-end !important;
    }

    .property-preview-modal-body {
        max-height: calc(95vh - 100px) !important;
    }

    .facebook-ad-card,
    .twitter-card,
    .linkedin-post-card {
        max-width: 100% !important;
    }

    .property-preview-table td:first-child {
        width: 40% !important;
        word-break: break-word !important;
    }
}

@media (max-width: 480px) {
    .property-preview-modal-header {
        padding: 16px !important;
    }

    .property-preview-modal-header h3 {
        font-size: 1rem !important;
    }

    .property-preview-close-btn {
        width: 36px !important;
        height: 36px !important;
        font-size: 24px !important;
    }

    .property-preview-modal-body {
        padding: 16px !important;
    }

    .property-preview-ad {
        padding: 16px !important;
        margin-bottom: 16px !important;
    }

    .property-preview-ad-title {
        font-size: 0.95rem !important;
    }

    .property-preview-loading {
        padding: 40px 15px !important;
    }

    .property-preview-spinner {
        width: 40px !important;
        height: 40px !important;
    }
}

/* =============================================
   BUTTON STYLING
   ============================================= */

.preview-button {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: white !important;
    border: none !important;
    padding: 8px 16px !important;
    border-radius: 6px !important;
    font-weight: 700 !important;
    cursor: pointer !important;
    transition: all 0.3s ease !important;
    font-size: 0.85rem !important;
}

.preview-button:hover {
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4) !important;
}

.preview-button:active {
    transform: translateY(0) !important;
}

.preview-button:disabled {
    opacity: 0.6 !important;
    cursor: not-allowed !important;
    transform: none !important;
}

.preview-button.facebook {
    background: linear-gradient(135deg, #0a66c2 0%, #084298 100%) !important;
}

.preview-button.facebook:hover {
    box-shadow: 0 4px 12px rgba(10, 102, 194, 0.4) !important;
}

.preview-button.instagram {
    background: linear-gradient(135deg, #e4405f 0%, #c13584 100%) !important;
}

.preview-button.instagram:hover {
    box-shadow: 0 4px 12px rgba(228, 64, 95, 0.4) !important;
}

.preview-button.twitter {
    background: linear-gradient(135deg, #1da1f2 0%, #1a8cd8 100%) !important;
}

.preview-button.twitter:hover {
    box-shadow: 0 4px 12px rgba(29, 161, 242, 0.4) !important;
}

.preview-button.linkedin {
    background: linear-gradient(135deg, #0a66c2 0%, #084298 100%) !important;
}

.preview-button.linkedin:hover {
    box-shadow: 0 4px 12px rgba(10, 102, 194, 0.4) !important;
}

.preview-button.google {
    background: linear-gradient(135deg, #4285f4 0%, #3367d6 100%) !important;
}

.preview-button.google:hover {
    box-shadow: 0 4px 12px rgba(66, 133, 244, 0.4) !important;
}

.preview-button.seo {
    background: linear-gradient(135deg, #34a853 0%, #0d652d 100%) !important;
}

.preview-button.seo:hover {
    box-shadow: 0 4px 12px rgba(52, 168, 83, 0.4) !important;
}

.preview-button.analytics {
    background: linear-gradient(135deg, #ea4335 0%, #c5221f 100%) !important;
}

.preview-button.analytics:hover {
    box-shadow: 0 4px 12px rgba(234, 67, 53, 0.4) !important;
}

/* =============================================
   CONTENT FORMATTING
   ============================================= */

.preview-heading {
    font-weight: 700 !important;
    color: #1f2937 !important;
    margin: 16px 0 8px 0 !important;
    font-size: 1rem !important;
}

.preview-subheading {
    font-weight: 600 !important;
    color: #374151 !important;
    margin: 12px 0 8px 0 !important;
    font-size: 0.95rem !important;
}

.preview-text {
    color: #4b5563 !important;
    font-size: 0.9rem !important;
    line-height: 1.6 !important;
}

.preview-monospace {
    font-family: 'Courier New', Courier, monospace !important;
    font-size: 0.85rem !important;
    word-break: break-all !important;
    overflow-x: auto !important;
}

.preview-highlight {
    background: #fff3cd !important;
    border-left: 4px solid #ffc107 !important;
    padding: 8px 12px !important;
    border-radius: 4px !important;
    margin: 12px 0 !important;
}

.preview-info {
    background: #d1ecf1 !important;
    border-left: 4px solid #17a2b8 !important;
    padding: 8px 12px !important;
    border-radius: 4px !important;
    margin: 12px 0 !important;
    font-size: 0.9rem !important;
}

.preview-error {
    background: #f8d7da !important;
    border-left: 4px solid #dc3545 !important;
    padding: 8px 12px !important;
    border-radius: 4px !important;
    margin: 12px 0 !important;
    color: #721c24 !important;
}

.preview-success {
    background: #d4edda !important;
    border-left: 4px solid #28a745 !important;
    padding: 8px 12px !important;
    border-radius: 4px !important;
    margin: 12px 0 !important;
    color: #155724 !important;
}
