/* Peipei Personalization Engine Styles */

/* Visibility control */
body:not(.elementor-editor-active) .peipei-hidden {
    display: none !important;
}

/* General CTA Button Styling */
.peipei-cta-button {
    display: inline-block;
    padding: 12px 24px;
    background-color: #007bff;
    color: white;
    text-decoration: none;
    border-radius: 4px;
    font-weight: 600;
    transition: background-color 0.3s ease;
    margin-top: 16px;
}

.peipei-cta-button:hover {
    background-color: #0056b3;
    text-decoration: none;
    color: white;
}

/* Welcome Back Widget */
.peipei-welcome-back {
    padding: 24px;
    background-color: #f8f9fa;
    border-left: 4px solid #007bff;
    border-radius: 4px;
}

.peipei-welcome-heading {
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #333;
}

.peipei-welcome-text {
    font-size: 16px;
    color: #666;
    margin-bottom: 16px;
    line-height: 1.6;
}

/* Package Upsell Widget */
.peipei-package-upsell {
    padding: 24px;
    background-color: #f0f4f8;
    border-radius: 8px;
    border-top: 3px solid #ffc107;
}

.peipei-package-upsell.highlight-returning {
    background-color: #e8f4f8;
    border-left: 4px solid #17a2b8;
}

.peipei-package-heading {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #333;
}

.peipei-package-description {
    font-size: 16px;
    color: #555;
    margin-bottom: 16px;
}

.peipei-cta-packages {
    background-color: #ffc107;
    color: #333;
}

.peipei-cta-packages:hover {
    background-color: #ff9800;
}

/* Length of Stay Widget */
.peipei-length-stay {
    padding: 20px;
    background-color: #f5f5f5;
    border-radius: 6px;
}

.peipei-stay-duration {
    font-size: 20px;
    font-weight: 700;
    color: #333;
    margin-bottom: 16px;
}

.peipei-stay-highlights {
    background-color: white;
    padding: 16px;
    border-radius: 4px;
    margin-bottom: 16px;
}

.peipei-stay-highlights ul {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

.peipei-stay-highlights li {
    padding: 8px 0;
    padding-left: 24px;
    position: relative;
    color: #555;
    font-size: 15px;
}

.peipei-stay-highlights li:before {
    content: "✓";
    position: absolute;
    left: 0;
    color: #28a745;
    font-weight: bold;
    font-size: 18px;
}

.peipei-cta-stay {
    background-color: #28a745;
}

.peipei-cta-stay:hover {
    background-color: #218838;
}

/* Accommodation Showcase Widget */
.peipei-accommodation-showcase {
    display: flex;
    gap: 24px;
    align-items: center;
    padding: 24px;
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.peipei-showcase-image {
    flex: 1;
    min-width: 250px;
}

.peipei-showcase-image img {
    width: 100%;
    height: auto;
    border-radius: 6px;
}

.peipei-showcase-content {
    flex: 1;
}

.peipei-showcase-heading {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    color: #333;
}

.peipei-showcase-text {
    font-size: 16px;
    color: #666;
    margin-bottom: 16px;
    line-height: 1.6;
}

.peipei-cta-showcase {
    background-color: #007bff;
}

.peipei-cta-showcase:hover {
    background-color: #0056b3;
}

/* Things to Do Widget */
.peipei-things-to-do {
    padding: 32px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 8px;
}

.peipei-activities-heading {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 8px;
    color: white;
}

.peipei-activities-subtext {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 16px;
    opacity: 0.95;
}

.peipei-highlights-list {
    margin-bottom: 20px;
}

.peipei-highlights-list ul {
    list-style-type: none;
    padding-left: 0;
    margin: 0;
}

.peipei-highlights-list li {
    padding: 10px 0;
    padding-left: 28px;
    position: relative;
    font-size: 16px;
    opacity: 0.95;
}

.peipei-highlights-list li:before {
    content: "→";
    position: absolute;
    left: 0;
    color: #ffeb3b;
    font-weight: bold;
    font-size: 18px;
}

.peipei-cta-activities {
    background-color: white;
    color: #667eea;
    font-weight: 700;
}

.peipei-cta-activities:hover {
    background-color: #f0f0f0;
}

/* Responsive Design */
@media (max-width: 768px) {
    .peipei-accommodation-showcase {
        flex-direction: column;
        gap: 16px;
    }
    
    .peipei-showcase-heading {
        font-size: 22px;
    }
    
    .peipei-activities-heading {
        font-size: 22px;
    }
    
    .peipei-welcome-heading,
    .peipei-package-heading {
        font-size: 18px;
    }
    
    .peipei-things-to-do {
        padding: 20px;
    }
}

/* Visibility based on visitor/guest type */
body:not(.elementor-editor-active) .peipei-widget-hidden {
    display: none !important;
}

.peipei-widget-loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Personalization indicators (for admin) */
.peipei-personalized::after {
    content: " [Personalized]";
    font-size: 12px;
    color: #007bff;
    font-weight: 600;
}

/* ===========================
   CONDITIONAL VISIBILITY RULES (These aren't that useful and are not used atm)
   =========================== */

/* Hide by default until JS applies correct class */
body:not(.elementor-editor-active) .peipei-conditional {
    display: none !important;
}

/* Show for past guests */
.peipei-only-prevguests.peipei-is-guest {
    display: block !important;
}

.peipei-only-prevguests.peipei-is-guest.elementor-widget {
    display: block !important;
}

.peipei-only-prevguests.peipei-is-guest.elementor-section {
    display: flex !important;
}

/* Show for new visitors */
.peipei-only-new-visitors.peipei-is-visitor {
    display: block !important;
}

.peipei-only-new-visitors.peipei-is-visitor.elementor-widget {
    display: block !important;
}

.peipei-only-new-visitors.peipei-is-visitor.elementor-section {
    display: flex !important;
}

/* Show for local visitors */
.peipei-only-local.peipei-is-local {
    display: block !important;
}

.peipei-only-local.peipei-is-local.elementor-widget {
    display: block !important;
}

.peipei-only-local.peipei-is-local.elementor-section {
    display: flex !important;
}

/* Show for non-local visitors */
.peipei-only-nonlocal.peipei-is-non-local {
    display: block !important;
}

.peipei-only-nonlocal.peipei-is-non-local.elementor-widget {
    display: block !important;
}

.peipei-only-nonlocal.peipei-is-non-local.elementor-section {
    display: flex !important;
}

/* Show for event visitors */
.peipei-only-event-visitors.peipei-is-event-visitor {
    display: block !important;
}

.peipei-only-event-visitors.peipei-is-event-visitor.elementor-widget {
    display: block !important;
}

.peipei-only-event-visitors.peipei-is-event-visitor.elementor-section {
    display: flex !important;
}

/* Hide for guests (show for visitors) */
.peipei-only-neverstayed.peipei-is-visitor {
    display: block !important;
}

.peipei-only-neverstayed.peipei-is-visitor.elementor-widget {
    display: block !important;
}

.peipei-only-neverstayed.peipei-is-visitor.elementor-section {
    display: flex !important;
}
