:root {
    --planr-teal: #0DB3C6;
    --planr-teal-dark: #03818F;
    --planr-black: #000000;
    --planr-white: #FFFFFF;
    --planr-light: #F8F7F7;
    --planr-gray: #6B7280;
    --planr-radius: 30px;
}

/* Main Search Bar Container */
.planr-search-widget {
    width: 80%;
    margin: 0 auto;
    position: relative;
    max-width: 1200px;
}

@media (max-width: 1024px) {
    .planr-search-widget {
        width: 90%;
    }
}

@media (max-width: 768px) {
    .planr-search-widget {
        width: 100%;
        padding: 0 16px;
        box-sizing: border-box;
    }
}

@media (max-width: 480px) {
    .planr-search-widget {
        padding: 0 12px;
    }
}

/* Search Bar */
.planr-search-bar {
    background: var(--planr-white);
    border-radius: var(--planr-radius);
    padding: 8px 8px 8px 24px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    transition: all 0.3s ease;
    border: none;
    min-height: 56px;
    box-sizing: border-box;
}

.planr-search-bar:hover {
    box-shadow: 0 6px 30px rgba(0, 0, 0, 0.15);
}

@media (max-width: 768px) {
    .planr-search-bar {
        padding: 6px 6px 6px 18px;
        min-height: 52px;
        gap: 8px;
    }
}

@media (max-width: 480px) {
    .planr-search-bar {
        padding: 5px 8px 5px 16px;
        min-height: 46px;
        gap: 8px;
        border-radius: 23px;
    }
}

.planr-search-input {
    flex: 1;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    color: var(--planr-black);
    background: transparent !important;
    min-width: 0;
    padding: 8px 0;
}

.planr-search-input::placeholder {
    color: var(--planr-gray);
}

.planr-search-input:focus {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

@media (max-width: 480px) {
    .planr-search-input {
        font-size: 14px;
        padding: 8px 0;
    }
    
    .planr-search-input::placeholder {
        font-size: 14px;
    }
}

/* Buttons Container */
.planr-search-buttons {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-shrink: 0;
}

@media (max-width: 480px) {
    .planr-search-buttons {
        gap: 8px;
    }
}

/* Plus Button */
.planr-plus-button {
    width: 48px;
    height: 48px;
    border-radius: 24px;
    background: linear-gradient(180deg, var(--planr-teal) 0%, var(--planr-teal-dark) 100%);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    flex-shrink: 0;
}

.planr-plus-button:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(13, 179, 198, 0.3);
}

@media (max-width: 768px) {
    .planr-plus-button {
        width: 44px;
        height: 44px;
        border-radius: 22px;
    }
}

@media (max-width: 480px) {
    .planr-plus-button {
        width: 36px;
        height: 36px;
        border-radius: 18px;
    }
    
    .planr-plus-button svg {
        width: 18px;
        height: 18px;
    }
}

/* Arrow Button */
.planr-arrow-button {
    width: 48px;
    height: 48px;
    border-radius: 24px;
    background: var(--planr-black);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: transform 0.2s ease, background 0.2s ease;
    flex-shrink: 0;
}

.planr-arrow-button:hover {
    transform: scale(1.05);
    background: #1a1a1a;
}

@media (max-width: 768px) {
    .planr-arrow-button {
        width: 44px;
        height: 44px;
        border-radius: 22px;
    }
}

@media (max-width: 480px) {
    .planr-arrow-button {
        width: 36px;
        height: 36px;
        border-radius: 18px;
    }
    
    .planr-arrow-button svg {
        width: 18px;
        height: 18px;
    }
}

/* Modal Overlay */
.planr-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 10000;
    align-items: center;
    justify-content: center;
    padding: 20px;
    backdrop-filter: blur(4px);
}

.planr-modal-overlay.active {
    display: flex;
}

/* Mobile: fullscreen overlay, no padding */
@media (max-width: 768px) {
    .planr-modal-overlay {
        padding: 0;
        background: #000000;
        backdrop-filter: none;
    }
}

/* Modal Container */
.planr-modal {
    background: linear-gradient(180deg, #000000 0%, #3d3d3d 100%);
    border-radius: var(--planr-radius);
    width: 100%;
    max-width: 800px;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: modalSlideIn 0.3s ease;
    position: relative;
}

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

/* Mobile: fullscreen modal, Claude app style */
@media (max-width: 768px) {
    .planr-modal {
        max-width: 100%;
        width: 100%;
        height: 100%;
        max-height: 100%;
        border-radius: 0;
        animation: modalSlideUp 0.3s ease;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        /* Prevent zoom and pinch */
        touch-action: pan-y;
        overflow: hidden;
        /* Prevent text selection zoom */
        user-select: none;
        -webkit-user-select: none;
        -webkit-touch-callout: none;
    }
    
    @keyframes modalSlideUp {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }
}

/* Modal Header */
.planr-modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(248, 247, 247, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .planr-modal-header {
        padding: 16px 20px;
        /* Safe area for notch devices */
        padding-top: max(16px, env(safe-area-inset-top));
        /* Sticky header on mobile */
        position: sticky;
        top: 0;
        z-index: 100;
        background: linear-gradient(180deg, #000000 0%, #1a1a1a 100%);
    }
}

.planr-modal-logo {
    height: auto;
    width: auto;
    max-width: 120px;
    max-height: 29px;
    object-fit: contain;
}

@media (max-width: 768px) {
    .planr-modal-logo {
        max-width: 100px;
        max-height: 24px;
    }
}

.planr-close-button {
    position: absolute;
    right: 24px;
    width: 36px;
    height: 36px;
    border-radius: 18px;
    background: rgba(248, 247, 247, 0.1);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    flex-shrink: 0;
}

.planr-close-button:hover {
    background: rgba(248, 247, 247, 0.2);
}

@media (max-width: 768px) {
    .planr-close-button {
        right: 16px;
        width: 32px;
        height: 32px;
        border-radius: 16px;
    }
    
    .planr-close-button svg {
        width: 16px;
        height: 16px;
    }
}

/* Chat Messages */
.planr-chat-messages {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    /* Smooth scrolling on mobile */
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    /* Ensure proper width calculation */
    width: 100%;
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .planr-chat-messages {
        padding: 16px 12px;
        gap: 12px;
        /* Ensure proper height calculation */
        height: 0;
        min-height: 0;
        /* Re-enable text selection in messages */
        user-select: text;
        -webkit-user-select: text;
        /* Prevent double-tap zoom */
        touch-action: pan-y;
        /* Prevent horizontal overflow */
        overflow-x: hidden;
    }
}

.planr-message {
    display: flex;
    gap: 12px;
    max-width: 80%;
    animation: messageSlideIn 0.3s ease;
    /* Ensure messages don't overflow on any device */
    width: fit-content;
    min-width: 0;
    box-sizing: border-box;
}

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

.planr-message.user {
    align-self: flex-end;
    flex-direction: row-reverse;
}

@media (max-width: 768px) {
    .planr-message {
        max-width: 85%;
        gap: 10px;
        /* Ensure messages don't overflow */
        width: fit-content;
        min-width: 0;
    }
}

.planr-message-avatar {
    width: 36px;
    height: 36px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    font-weight: 600;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .planr-message-avatar {
        width: 32px;
        height: 32px;
        border-radius: 16px;
        font-size: 13px;
    }
}

.planr-message.user .planr-message-avatar {
    background: linear-gradient(180deg, var(--planr-teal) 0%, var(--planr-teal-dark) 100%);
    color: var(--planr-white);
}

.planr-message.assistant .planr-message-avatar {
    background: var(--planr-light);
    color: var(--planr-black);
    padding: 4px;
    overflow: hidden;
}

.planr-message.assistant .planr-message-avatar img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.planr-message-content {
    background: rgba(248, 247, 247, 0.05);
    padding: 12px 16px;
    border-radius: 20px;
    font-size: 15px;
    line-height: 1.6;
    color: var(--planr-light);
    /* Comprehensive text wrapping for all devices */
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
    hyphens: auto;
    -webkit-hyphens: auto;
    -moz-hyphens: auto;
    -ms-hyphens: auto;
    /* Prevent overflow */
    max-width: 100%;
    overflow: hidden;
    /* Ensure box-sizing is consistent */
    box-sizing: border-box;
}

@media (max-width: 768px) {
    .planr-message-content {
        padding: 10px 14px;
        font-size: 14px;
        line-height: 1.5;
        border-radius: 18px;
        /* Ensure text wraps properly */
        max-width: 100%;
        word-break: break-word;
        overflow-wrap: anywhere;
        hyphens: auto;
    }
}

.planr-message.user .planr-message-content {
    background: linear-gradient(180deg, var(--planr-teal) 0%, var(--planr-teal-dark) 100%);
    color: var(--planr-white);
}

/* Formatting for AI responses */
.planr-message-content h2,
.planr-message-content h3,
.planr-message-content h4 {
    color: var(--planr-white);
    font-weight: 600;
    margin-top: 16px;
    margin-bottom: 8px;
    font-size: 16px;
    /* Ensure headers wrap */
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-word;
}

.planr-message-content h2:first-child,
.planr-message-content h3:first-child {
    margin-top: 0;
}

.planr-message-content p {
    margin: 10px 0;
}

.planr-message-content p:first-child {
    margin-top: 0;
}

.planr-message-content p:last-child {
    margin-bottom: 0;
}

.planr-message-content ul,
.planr-message-content ol {
    margin: 10px 0;
    padding-left: 24px;
}

.planr-message-content li {
    margin: 6px 0;
    /* Ensure list items wrap */
    word-wrap: break-word;
    overflow-wrap: break-word;
}

.planr-message-content strong {
    font-weight: 600;
    color: var(--planr-white);
}

.planr-message-content em {
    font-style: italic;
}

.planr-message-content a {
    color: var(--planr-teal);
    text-decoration: underline;
    /* Ensure long URLs wrap */
    word-wrap: break-word;
    overflow-wrap: break-word;
    word-break: break-all;
}

.planr-message-content a:hover {
    color: var(--planr-white);
}

/* Question messages - slightly different styling */
.planr-message.assistant:last-child .planr-message-content {
    border-left: 3px solid var(--planr-teal);
    padding-left: 13px;
}

/* Loading Indicator */
.planr-loading {
    display: flex;
    gap: 6px;
    padding: 12px 16px;
}

.planr-typing-indicator {
    font-style: italic;
    opacity: 0.7;
    font-size: 14px;
}

.planr-loading-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--planr-light);
    animation: loadingBounce 1.4s infinite ease-in-out;
}

.planr-loading-dot:nth-child(1) {
    animation-delay: -0.32s;
}

.planr-loading-dot:nth-child(2) {
    animation-delay: -0.16s;
}

@keyframes loadingBounce {
    0%, 80%, 100% {
        transform: scale(0.8);
        opacity: 0.5;
    }
    40% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Quick Actions */
.planr-quick-actions {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 12px;
    padding: 0 24px 24px;
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .planr-quick-actions {
        grid-template-columns: 1fr;
        padding: 0 16px 16px;
        gap: 10px;
    }
}

.planr-quick-action {
    background: rgba(248, 247, 247, 0.05);
    border: 1px solid rgba(248, 247, 247, 0.1);
    padding: 12px 16px;
    border-radius: 15px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: var(--planr-light);
    cursor: pointer;
    transition: all 0.2s ease;
    text-align: left;
}

.planr-quick-action:hover {
    background: var(--planr-teal);
    color: var(--planr-white);
    transform: translateY(-2px);
    border-color: var(--planr-teal);
}

@media (max-width: 768px) {
    .planr-quick-action {
        padding: 10px 14px;
        font-size: 13px;
        border-radius: 12px;
    }
    
    .planr-quick-action:active {
        transform: scale(0.98);
    }
}

/* Chat Input */
.planr-chat-input-container {
    padding: 16px 24px 24px;
    border-top: 1px solid rgba(248, 247, 247, 0.1);
    flex-shrink: 0;
}

@media (max-width: 768px) {
    .planr-chat-input-container {
        padding: 12px 16px;
        /* Safe area for home indicator */
        padding-bottom: max(12px, env(safe-area-inset-bottom));
    }
}

.planr-chat-input-wrapper {
    background: var(--planr-light) !important;
    border-radius: var(--planr-radius) !important;
    padding: 8px 8px 8px 20px !important;
    display: flex !important;
    align-items: center !important;
    gap: 12px !important;
    border: 1px solid var(--planr-light) !important;
    outline: none !important;
    box-shadow: none !important;
    transition: border-color 0.2s ease;
    min-height: 48px;
}

.planr-chat-input-wrapper:focus-within {
    border-color: var(--planr-light) !important;
    outline: none !important;
    box-shadow: none !important;
}

@media (max-width: 768px) {
    .planr-chat-input-wrapper {
        padding: 6px 6px 6px 16px !important;
        gap: 10px !important;
        border-radius: 24px !important;
        min-height: 44px;
    }
}

.planr-chat-input-field {
    flex: 1;
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
    font-family: 'Poppins', sans-serif;
    font-size: 15px;
    color: #000000;
    background: transparent !important;
    min-width: 0;
    /* Prevent zoom on iOS */
    font-size: 16px;
}

.planr-chat-input-field::placeholder {
    color: rgba(0, 0, 0, 0.4);
}

.planr-chat-input-field:focus {
    border: none !important;
    outline: none !important;
    box-shadow: none !important;
}

@media (max-width: 768px) {
    .planr-chat-input-field {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

.planr-chat-send-button {
    width: 44px;
    height: 44px;
    border-radius: 22px;
    background: var(--planr-light);
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.planr-chat-send-button:hover {
    background: var(--planr-white);
    transform: scale(1.05);
}

.planr-chat-send-button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

@media (max-width: 768px) {
    .planr-chat-send-button {
        width: 40px;
        height: 40px;
        border-radius: 20px;
    }
    
    .planr-chat-send-button:active {
        transform: scale(0.95);
    }
    
    .planr-chat-send-button svg {
        width: 20px;
        height: 20px;
    }
}

/* Floating Chat Icon - Desktop Only */
.planr-floating-chat-icon {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 66px;
    height: 66px;
    border-radius: 33px;
    background: var(--planr-white);
    border: 3px solid var(--planr-teal);
    box-shadow: 0 4px 20px rgba(13, 179, 198, 0.4);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: all 0.3s ease;
}

.planr-floating-chat-icon:hover {
    transform: scale(1.1);
    box-shadow: 0 6px 30px rgba(13, 179, 198, 0.6);
    border-color: var(--planr-teal-dark);
}

/* Transparent PNG favicon inside */
.planr-floating-chat-icon img {
    width: 42px;
    height: 42px;
    object-fit: contain;
    object-position: center;
}

/* Hide floating icon on mobile (use bottom nav instead) */
@media (max-width: 768px) {
    .planr-floating-chat-icon {
        display: none;
    }
}

/* Mobile Bottom Navigation - 5-Icon App Style (White Background) */
/* Mobile Bottom Navigation with Curved Notch */
.planr-mobile-bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9998;
    height: 65px;
    background: #FFFFFF;
    box-shadow: 0 -2px 16px rgba(0, 0, 0, 0.08);
}

@media (max-width: 768px) {
    .planr-mobile-bottom-nav {
        display: block;
    }
}

/* Navigation Items Container */
.planr-nav-items {
    display: flex;
    justify-content: space-around;
    align-items: flex-end;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    padding: 0 16px;
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    position: relative;
    height: 100%;
}

/* Individual Nav Button Base */
.planr-nav-button {
    background: transparent;
    border: none;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-end;
    transition: all 0.2s ease;
    position: relative;
    padding: 0 8px 4px;
    min-width: 60px;
    flex: 1;
    z-index: 2;
}

.planr-nav-button:active {
    transform: scale(0.95);
}

/* Icon Styling */
.planr-nav-button svg {
    width: 24px;
    height: 24px;
    stroke: #000000;
    fill: none;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: all 0.2s ease;
}

/* Label Text - All black */
.planr-nav-label {
    font-family: 'Poppins', sans-serif;
    font-size: 10px;
    font-weight: 500;
    color: #000000;
    margin-top: 4px;
    text-align: center;
    line-height: 1;
    transition: all 0.2s ease;
}

/* Center Button (Ask Planr) - Slightly elevated, smaller and more consistent */
.planr-nav-button.center {
    position: relative;
    padding-bottom: 8px;
}

.planr-nav-button.center .planr-nav-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 24px;
    background: #FFFFFF;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.12);
    transition: all 0.2s ease;
    position: relative;
    z-index: 10;
}

.planr-nav-button.center:active .planr-nav-icon-wrapper {
    transform: scale(0.95);
    box-shadow: 0 1px 4px rgba(0, 0, 0, 0.15);
}

/* Planr Favicon Styling */
.planr-nav-button.center .planr-favicon {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

/* Center button label also black */
.planr-nav-button.center .planr-nav-label {
    color: #000000;
    font-weight: 500;
    font-size: 10px;
    margin-top: 4px;
}

/* Active/Tap State for Regular Buttons */
.planr-nav-button:active:not(.center) svg {
    stroke: var(--planr-teal);
}

.planr-nav-button:active:not(.center) .planr-nav-label {
    color: var(--planr-teal);
}

/* Add bottom padding to body on mobile to account for nav bar */
@media (max-width: 768px) {
    body {
        padding-bottom: 65px;
    }
    
    body.planr-modal-open {
        padding-bottom: 0;
    }
}

/* Prevent body scroll when modal is open on mobile */
body.planr-modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
    height: 100%;
}

/* Fix for iOS Safari viewport units */
@supports (-webkit-touch-callout: none) {
    @media (max-width: 768px) {
        .planr-modal {
            height: -webkit-fill-available;
        }
    }
}

/* ============================================
   MODAL FORMS STYLES (v3.8.3)
   Demo Booking & Video Access Modals
   Updated to match Planr website styling
   ============================================ */

:root {
    --planr-primary: #0DB3C6;
    --planr-primary-hover: #03818F;
    --planr-dark: #3a3a3a;
    --planr-text: #4B4F58;
    --planr-white: #FFFFFF;
    --planr-light-bg: #F5F5F5;
    --planr-border: #E5E7EB;
}

/* Base Modal Styles */
.planr-form-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 999999;
    display: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.planr-form-modal.active {
    display: flex;
    opacity: 1;
}

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

.planr-form-modal-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
}

.planr-form-modal-content {
    position: relative;
    background: #FFFFFF;
    border-radius: 16px;
    width: 100%;
    max-width: 500px;
    padding: 32px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

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

/* Close Button */
.planr-form-modal-close {
    position: absolute;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: none;
    background: transparent;
    cursor: pointer;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.2s ease;
    z-index: 10;
}

.planr-form-modal-close:hover {
    background: #F3F4F6;
    transform: rotate(90deg);
}

.planr-form-modal-close svg {
    width: 24px;
    height: 24px;
    stroke: #6B7280;
    stroke-width: 2;
    stroke-linecap: round;
    fill: none;
}

/* Header */
.planr-form-modal-header {
    text-align: center;
    margin-bottom: 32px;
}

.planr-video-icon {
    width: 64px;
    height: 64px;
    margin: 0 auto 16px;
    background: linear-gradient(135deg, #0066CC 0%, #0052A3 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.planr-video-icon svg {
    width: 28px;
    height: 28px;
    fill: #FFFFFF;
    margin-left: 4px;
}

.planr-form-modal-title {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 32px;
    font-weight: 600;
    color: var(--planr-dark);
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.planr-form-modal-subtitle {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    color: var(--planr-text);
    margin: 0;
    line-height: 1.5;
}

/* Form Styles */
.planr-form-modal-form {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.planr-form-field {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.planr-form-label {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 14px;
    font-weight: 600;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 4px;
}

.planr-form-required {
    color: #EF4444;
    font-weight: 700;
}

.planr-form-optional {
    font-weight: 400;
    color: #9CA3AF;
}

.planr-form-input {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 16px;
    padding: 12px 16px;
    border: 2px solid #E5E7EB;
    border-radius: 8px;
    background: #FFFFFF;
    color: #1F2937;
    transition: all 0.2s ease;
    outline: none;
    -webkit-appearance: none;
    appearance: none;
}

.planr-form-input:focus {
    border-color: #0066CC;
    box-shadow: 0 0 0 4px rgba(0, 102, 204, 0.1);
}

.planr-form-input::placeholder {
    color: #9CA3AF;
}

.planr-form-input.error {
    border-color: #EF4444;
}

.planr-form-input.error:focus {
    border-color: #EF4444;
    box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.1);
}

.planr-form-error {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 13px;
    color: #EF4444;
    display: none;
    margin-top: 4px;
}

.planr-form-error.show {
    display: block;
}

/* Submit Button */
.planr-form-submit-btn {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 16px;
    font-weight: 600;
    padding: 15px 30px;
    background: var(--planr-primary);
    color: var(--planr-white);
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 48px;
    margin-top: 8px;
    box-shadow: none;
}

.planr-form-submit-btn:hover {
    background: var(--planr-primary-hover);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(1, 112, 185, 0.3);
}

.planr-form-submit-btn:active {
    transform: translateY(0);
}

.planr-form-submit-btn:disabled {
    background: #9CA3AF;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.planr-form-btn-loading {
    display: flex;
    align-items: center;
    gap: 8px;
}

.planr-form-spinner {
    width: 20px;
    height: 20px;
    animation: spin 1s linear infinite;
}

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

/* Success Message */
.planr-form-success-message {
    text-align: center;
    padding: 24px;
    background: #F0FDF4;
    border: 2px solid #10B981;
    border-radius: 8px;
    display: none;
    animation: fadeIn 0.3s ease;
}

.planr-form-success-message.show {
    display: block;
}

.planr-form-success-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 16px;
    stroke: #10B981;
    stroke-width: 3;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
}

.planr-form-success-message h3 {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 20px;
    font-weight: 700;
    color: #065F46;
    margin: 0 0 8px 0;
}

.planr-form-success-message p {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 15px;
    color: #047857;
    margin: 0;
    line-height: 1.5;
}

/* General Error Message */
.planr-form-general-error {
    display: none;
    padding: 12px 16px;
    background: #FEF2F2;
    border: 1px solid #FCA5A5;
    border-radius: 8px;
    color: #991B1B;
    font-size: 14px;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
}

.planr-form-general-error.show {
    display: flex;
}

.planr-form-general-error svg {
    flex-shrink: 0;
    stroke: #EF4444;
    stroke-width: 2;
    stroke-linecap: round;
    fill: none;
}

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

/* Mobile Optimization */
@media (max-width: 768px) {
    .planr-form-modal-container {
        padding: 0;
        align-items: flex-end;
    }
    
    .planr-form-modal-content {
        max-width: 100%;
        border-radius: 24px 24px 0 0;
        padding: 24px;
        max-height: 90vh;
        overflow-y: auto;
        animation: slideUpMobile 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    @keyframes slideUpMobile {
        from {
            transform: translateY(100%);
        }
        to {
            transform: translateY(0);
        }
    }
    
    .planr-form-modal-title {
        font-size: 22px;
    }
    
    .planr-form-modal-subtitle {
        font-size: 15px;
    }
    
    .planr-form-modal-header {
        margin-bottom: 24px;
    }
    
    .planr-form-modal-form {
        gap: 16px;
    }
    
    .planr-form-input {
        font-size: 16px; /* Prevent zoom on iOS */
    }
}

/* Prevent body scroll when form modal is open */
body.planr-form-modal-open {
    overflow: hidden;
    position: fixed;
    width: 100%;
}

/* Dark mode support (optional) */
@media (prefers-color-scheme: dark) {
    .planr-form-modal-content {
        background: #1F2937;
    }
    
    .planr-form-modal-title {
        color: #F9FAFB;
    }
    
    .planr-form-modal-subtitle {
        color: #D1D5DB;
    }
    
    .planr-form-label {
        color: #E5E7EB;
    }
    
    .planr-form-input {
        background: #374151;
        border-color: #4B5563;
        color: #F9FAFB;
    }
    
    .planr-form-input:focus {
        border-color: #3B82F6;
        background: #374151;
    }
}


/* ============================================
   CALENDAR EMBED STYLES (v3.8.3)
   ============================================ */

.planr-calendar-embed {
    width: 100%;
    padding: 20px 0;
}

.planr-calendar-header {
    text-align: center;
    margin-bottom: 30px;
}

.planr-calendar-header h3 {
    font-family: 'Poppins', sans-serif;
    font-size: 32px;
    font-weight: 600;
    color: var(--planr-dark);
    margin: 0 0 10px 0;
}

.planr-calendar-header p {
    font-family: 'Poppins', sans-serif;
    font-size: 16px;
    color: var(--planr-text);
    margin: 0;
}

.planr-calendar-iframe-container {
    position: relative;
    width: 100%;
    border-radius: 12px;
    overflow: hidden;
    background: var(--planr-white);
}

.planr-calendar-iframe-container iframe {
    width: 100%;
    height: 700px;
    border: none;
    display: block;
}

/* Hide HubSpot branding */
.planr-calendar-iframe-container::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to top, var(--planr-white) 40%, transparent);
    pointer-events: none;
    z-index: 10;
}

@media (max-width: 768px) {
    .planr-calendar-header h3 {
        font-size: 24px;
    }
    
    .planr-calendar-iframe-container iframe {
        height: 600px;
    }
}

/* Success message with calendar should not have background */
.planr-form-success-message.show .planr-calendar-embed {
    background: transparent;
    padding: 0;
    border: none;
}

/* When showing calendar, remove success message green styling */
.planr-form-success-message:has(.planr-calendar-embed) {
    background: transparent;
    border: none;
    padding: 0;
}


/* ============================================
   VIDEO MODAL - Simple Player (like website)
   ============================================ */

.planr-video-modal-overlay {
    position: fixed;
    z-index: 999999;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.95);
}

.planr-video-modal-overlay.active {
    display: flex !important;
    align-items: center;
    justify-content: center;
}

.planr-video-modal-container {
    position: relative;
    width: 90%;
    max-width: 1200px;
    aspect-ratio: 16/9;
    background: var(--planr-black);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 20px 60px rgba(13, 179, 198, 0.5);
}

.planr-video-modal-container video {
    width: 100%;
    height: 100%;
    display: block;
}

.planr-video-close-btn {
    position: absolute;
    top: -50px;
    right: 0;
    color: var(--planr-white);
    font-size: 40px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s ease;
    background: none;
    border: none;
    padding: 10px;
    line-height: 1;
    z-index: 10;
}

.planr-video-close-btn:hover {
    color: var(--planr-teal);
    transform: scale(1.1);
}

@media (max-width: 768px) {
    .planr-video-modal-container {
        width: 95%;
    }
    
    .planr-video-close-btn {
        top: -40px;
        font-size: 32px;
    }
}

/* Wider modal when showing calendar */
.planr-form-modal-content:has(.planr-form-success-message.show) {
    max-width: 900px;
    padding: 20px;
}

/* More height for modal container when showing calendar */
.planr-form-modal-container:has(.planr-form-success-message.show) {
    overflow-y: auto;
}

/* Tablet-specific adjustments (between mobile and desktop) */
@media (min-width: 481px) and (max-width: 768px) {
    .planr-message {
        max-width: 75%;
    }
    
    .planr-message-content {
        padding: 11px 15px;
        font-size: 14.5px;
    }
}

/* Extra small devices - ensure nothing overflows */
@media (max-width: 375px) {
    .planr-message {
        max-width: 80%;
    }
    
    .planr-chat-messages {
        padding: 12px 8px;
    }
    
    .planr-message-content {
        padding: 9px 12px;
        font-size: 13.5px;
    }
}

/* Prevent images in message content - text only responses */
.planr-message-content img,
.planr-message-content svg,
.planr-message-content canvas,
.planr-message-content video {
    display: none !important;
}
