/* Dashboard App Styles */

/* Custom styles loaded after Tailwind to ensure proper priority */
html {
    font-size: 14px;
}

body {
    font-family: "Open Sans", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !important;
}

/* Touch-optimized input styles for better on-screen keyboard support */
input[type="text"],
input[type="email"],
input[type="tel"],
input[type="number"],
input[type="password"],
input[type="search"],
input[type="url"],
textarea,
select {
    /* Prevent iOS from zooming when input is focused */
    font-size: 16px !important;
    /* Better touch targets */
    min-height: 44px;
    /* Ensure proper touch interaction */
    touch-action: manipulation;
    /* Disable browser auto-features that might interfere */
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
}

/* Additional touch optimization for textareas */
textarea {
    /* Ensure textarea is resizable on touch devices */
    resize: vertical;
    /* Better touch scrolling inside textarea */
    -webkit-overflow-scrolling: touch;
}

/* Focus styles for better visibility on touch devices */
input:focus,
textarea:focus,
select:focus {
    outline: 2px solid #CA0237;
    outline-offset: 2px;
}

/* Prevent double-tap zoom on buttons and links */
button,
a,
[role="button"] {
    touch-action: manipulation;
}

/* Ensure touch events work properly on form elements */
.touch-manipulation {
    touch-action: manipulation;
}

.font-sans {
    font-family: "Open Sans", ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji" !important;
}

.text-primary {
    color: #3B82F6;
}

.bg-secondary {
    background-color: #374151;
}

.bg-primary {
    --tw-bg-opacity: 1;
    background-color: rgb(202 2 55 / var(--tw-bg-opacity));
}

/* Page transition animations */
.page-enter {
    opacity: 0;
    transform: translateY(20px);
}

.page-enter-active {
    opacity: 1;
    transform: translateY(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.page-exit {
    opacity: 1;
}

.page-exit-active {
    opacity: 0;
    transition: opacity 0.2s ease;
}

/* Loading state */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
}

/* Image container for Lageplan */
.image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 60vh;
}

.image-container img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
}

/* Video container styles */
.video-container {
    background: #000;
    padding: 2rem;
    text-align: center;
    color: white;
    min-height: 300px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

/* Teams video containers */
#local-video-container,
#remote-video-container {
    width: 100%;
    height: 100%;
    background: #000;
    position: relative;
}

#local-video-container video,
#remote-video-container video {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Video placeholder styles */
#local-video-placeholder,
#remote-video-placeholder {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Call status styles */
.call-status {
    padding: 0.5rem 1rem;
    margin: 0.5rem 0;
    text-align: center;
}

.call-status.info {
    background-color: #3b82f6;
    color: white;
}

.call-status.success {
    background-color: #10b981;
    color: white;
}

.call-status.error {
    background-color: #ef4444;
    color: white;
}

.call-status.warning {
    background-color: #f59e0b;
    color: white;
}

/* Storyblok Content Styles */
.storyblok-content {
    width: 100%;
}

.storyblok-content .content-block {
    margin-bottom: 1.5rem;
}

.storyblok-content .content-block:last-child {
    margin-bottom: 0;
}

.storyblok-content .prose {
    max-width: none;
    color: #4b5563;
    line-height: 1.6;
}

.storyblok-content .prose p {
    margin-bottom: 1rem;
}

.storyblok-content .prose p:last-child {
    margin-bottom: 0;
}

.storyblok-content .prose strong {
    font-weight: 600;
    color: #374151;
}

.storyblok-content .prose em {
    font-style: italic;
}

.storyblok-content .prose a {
    color: #CA0237;
    text-decoration: underline;
}

.storyblok-content .prose a:hover {
    color: #E3023E;
}

/* Text einspaltig - full width text */
.text-content.full-width {
    width: 100%;
}

/* Text zweispaltig - two column layout */
.text-content.two-column {
    width: 100%;
}

/* Text bild - text with image */
.text-image-content {
    width: 100%;
}

.text-image-content .image-container img {
    /* No border or shadow */
}

/* Text video - text with video */
.text-video-content {
    width: 100%;
}

.text-video-content .youtube-video-wrapper {
    width: 100%;
}

.text-video-content iframe {
    /* No border or rounded corners for clean video display */
}

/* Video - full width video */
.video-content {
    width: 100%;
}

.video-content iframe {
    /* No border or rounded corners for clean video display */
}

/* Responsive adjustments for Storyblok content */
@media (max-width: 768px) {
    .text-content.two-column .grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .text-image-content .grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .text-video-content .grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
}

/* Accordion Styles */
.accordion-container {
    background: white;
}

.accordion-item {
    border-top: 1px solid #999999;
    background: white;
}

.accordion-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    background: white;
}

.accordion-header:hover {
    background-color: #f8f9fa;
}

.accordion-title {
    font-size: 1rem;
    font-weight: 600;
    color: #212529;
}

.accordion-icon {
    width: 1.5rem;
    height: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0; /* Prevent icon from shrinking */
}

.accordion-icon img {
    width: 100%;
    height: 100%;
    object-fit: contain; /* Ensure icon fits properly */
}

/* Nested accordion styles */
.nested-accordion {
    margin-left: 2rem; /* 32px indentation */
    /* No bottom margin to match parent accordion height */
}

.nested-accordion .accordion-item.nested {
    border-top: 1px solid #e5e7eb; /* Lighter border for nested items */
}

.nested-accordion .accordion-header {
    padding: 0.75rem 1.5rem; /* Slightly less padding for nested items */
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.4s ease-out;
    background: white;
}

.accordion-item.active .accordion-content {
    transition: max-height 0.4s ease-in;
}

.accordion-body {
    padding: 1.5rem;
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.accordion-text {
    flex: 2;
    color: #495057;
    line-height: 1.6;
    font-size: 0.9rem;
}

.accordion-text p {
    margin-bottom: 1rem;
}

.accordion-text p:last-child {
    margin-bottom: 0;
}

.accordion-images {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    align-items: center;
}

.accordion-images img {
    width: 100%;
    max-width: 180px;
    height: auto;
    border-radius: 0.25rem;
    border: 1px solid #dee2e6;
    box-shadow: 0 2px 4px 0 rgba(0, 0, 0, 0.1);
}

@media (max-width: 768px) {
    .accordion-body {
        flex-direction: column;
        padding: 1rem;
        gap: 1.5rem;
    }
    
    .accordion-images {
        flex-direction: row;
        justify-content: center;
        gap: 1rem;
    }
    
    .accordion-images img {
        max-width: 120px;
    }
    
    .accordion-header {
        padding: 0.75rem 1rem;
    }
    
    .accordion-title {
        font-size: 0.9rem;
    }
}