/* Reset and full-screen setup for iPad */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    overflow: hidden;
    position: fixed;
    -webkit-overflow-scrolling: touch;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', 'Oxygen',
        'Ubuntu', 'Cantarell', 'Fira Sans', 'Droid Sans', 'Helvetica Neue',
        sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Full-screen container for Voiceflow widget */
#voiceflow-widget-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    overflow: hidden;
}

/* Ensure the widget iframe/content fills the container */
#voiceflow-widget-container > * {
    width: 100% !important;
    height: 100% !important;
}

/* Handle both portrait and landscape orientations on iPad */
@media screen and (orientation: portrait) {
    #voiceflow-widget-container {
        width: 100vw;
        height: 100vh;
    }
}

@media screen and (orientation: landscape) {
    #voiceflow-widget-container {
        width: 100vw;
        height: 100vh;
    }
}

/* Prevent zoom on double-tap for iOS/iPad */
body {
    touch-action: manipulation;
    background-color: #1F2529 !important;
}

/* Hide Safari UI bars on iPad when possible */
@supports (-webkit-touch-callout: none) {
    body {
        height: -webkit-fill-available;
    }

    #voiceflow-widget-container {
        height: -webkit-fill-available;
    }
}

/* iOS Add to Home Screen Overlay Styles */
.ios-prompt-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.85);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    animation: fadeIn 0.3s ease-in-out;
}

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

.ios-prompt-content {
    background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
    border-radius: 20px;
    padding: 40px 30px;
    max-width: 450px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    animation: slideUp 0.4s ease-out;
}

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

.ios-prompt-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: #fff;
    font-size: 32px;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
    line-height: 1;
}

.ios-prompt-close:hover {
    background: rgba(255, 255, 255, 0.2);
}

.ios-prompt-icon {
    margin-bottom: 20px;
    display: flex;
    justify-content: center;
}

.ios-prompt-title {
    color: #fff;
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.ios-prompt-text {
    color: #aaa;
    font-size: 16px;
    line-height: 1.5;
    margin-bottom: 25px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.ios-prompt-steps {
    text-align: left;
    color: #fff;
    font-size: 15px;
    line-height: 1.8;
    margin: 0 auto 30px;
    max-width: 350px;
    padding-left: 20px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.ios-prompt-steps li {
    margin-bottom: 12px;
    position: relative;
}

.ios-prompt-steps strong {
    color: #007AFF;
}

.ios-prompt-dismiss {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: #aaa;
    padding: 12px 25px;
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

.ios-prompt-dismiss:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.5);
    color: #fff;
}
