/* Import Boels brand colors */
@import url('colors.css');

/* Base styles */
* {
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-primary);
    background-color: var(--bg-primary);
    margin: 0;
    padding: 0;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Mobile-first approach */
.container {
    width: 100%;
    padding: 0 1rem;
    margin: 0 auto;
}

@media (min-width: 640px) {
    .container {
        max-width: 640px;
    }
}

@media (min-width: 768px) {
    .container {
        max-width: 768px;
    }
}

@media (min-width: 1024px) {
    .container {
        max-width: 1024px;
        padding: 0 2rem;
    }
}

/* Boels branded button styles */
.btn-boels {
    background-color: var(--boels-orange);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    text-align: center;
}

.btn-boels:hover {
    background-color: var(--boels-orange-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.btn-boels:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

/* Secondary button */
.btn-secondary {
    background-color: var(--gray-600);
    color: var(--white);
    padding: 0.75rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 600;
    text-decoration: none;
    display: inline-block;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn-secondary:hover {
    background-color: var(--gray-700);
}

/* Touch-friendly sizes for mobile */
@media (max-width: 767px) {
    .btn-boels,
    .btn-secondary {
        min-height: 44px;
        min-width: 44px;
        padding: 0.875rem 1.5rem;
    }
}

/* FAQ Accordion styles */
.faq-item {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 0.5rem;
    margin-bottom: 0.75rem;
    overflow: hidden;
    transition: all 0.2s ease;
}

.faq-item.active {
    border-color: var(--boels-orange);
    box-shadow: var(--shadow-md);
}

.faq-question {
    padding: 1rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: transparent;
    border: none;
    width: 100%;
    text-align: left;
    color: var(--text-primary);
    font-size: 1rem;
    min-height: 60px;
}

.faq-question:hover {
    background: var(--bg-secondary);
}

.faq-question::after {
    content: '+';
    font-size: 1.5rem;
    color: var(--boels-orange);
    transition: transform 0.2s ease;
}

.faq-item.active .faq-question::after {
    transform: rotate(45deg);
}

.faq-answer {
    padding: 0 1rem;
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.faq-item.active .faq-answer {
    padding: 0 1rem 1rem;
    max-height: none;
    overflow: visible;
}

/* Chat interface styles */
.chat-container {
    background: var(--chat-bg);
    border-radius: 0.5rem;
    border: 1px solid var(--border-light);
    margin-top: 2rem;
    overflow: hidden;
    max-height: 600px;
    display: flex;
    flex-direction: column;
}

.chat-header {
    background: var(--boels-orange);
    color: var(--white);
    padding: 1rem;
    font-weight: 600;
    font-size: 1.125rem;
}

.chat-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    min-height: 300px;
    max-height: 400px;
}

.chat-message {
    margin-bottom: 1rem;
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
}

.chat-message.user {
    flex-direction: row-reverse;
}

.chat-bubble {
    max-width: 80%;
    padding: 0.75rem 1rem;
    border-radius: 1rem;
    word-wrap: break-word;
}

.chat-message.user .chat-bubble {
    background: var(--chat-user-bg);
    color: var(--chat-user-text);
    border-bottom-right-radius: 0.25rem;
}

.chat-message.bot .chat-bubble {
    background: var(--chat-bot-bg);
    color: var(--chat-bot-text);
    border: 1px solid var(--chat-bot-border);
    border-bottom-left-radius: 0.25rem;
}

/* Markdown styling in chat bubbles */
.chat-bubble strong {
    font-weight: 600;
}

.chat-bubble em {
    font-style: italic;
}

.chat-bubble code {
    font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
    font-size: 0.85em;
}

.chat-bubble pre {
    margin: 0.5rem 0;
    white-space: pre-wrap;
    word-wrap: break-word;
}

.chat-bubble pre code {
    background: none !important;
    padding: 0 !important;
    border-radius: 0 !important;
}

.chat-bubble a {
    word-break: break-all;
}

.chat-input-container {
    padding: 1rem;
    border-top: 1px solid var(--border-light);
    background: var(--bg-primary);
}

.chat-input-form {
    display: flex;
    gap: 0.5rem;
}

.chat-input {
    flex: 1;
    padding: 0.75rem;
    border: 1px solid var(--input-border);
    border-radius: 0.375rem;
    font-size: 1rem;
    outline: none;
    transition: border-color 0.2s ease;
}

.chat-input:focus {
    border-color: var(--input-focus-border);
}

.chat-send-btn {
    padding: 0.75rem 1.5rem;
    background: var(--boels-orange);
    color: var(--white);
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    font-weight: 600;
    transition: background 0.2s ease;
}

.chat-send-btn:hover {
    background: var(--boels-orange-dark);
}

.chat-send-btn:disabled {
    background: var(--gray-400);
    cursor: not-allowed;
}

/* Loading animation */
.loading-dots {
    display: inline-flex;
    gap: 0.25rem;
}

.loading-dots span {
    width: 8px;
    height: 8px;
    background: var(--gray-400);
    border-radius: 50%;
    animation: loading 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(2) {
    animation-delay: 0.2s;
}

.loading-dots span:nth-child(3) {
    animation-delay: 0.4s;
}

@keyframes loading {
    0%, 60%, 100% {
        opacity: 0.3;
        transform: scale(1);
    }
    30% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Machine info card */
.machine-card {
    background: var(--card-bg);
    border: 1px solid var(--border-light);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: var(--shadow-sm);
}

.machine-card h1 {
    color: var(--boels-orange);
    margin: 0 0 0.5rem 0;
    font-size: 1.5rem;
}

.machine-card .machine-code {
    color: var(--text-secondary);
    font-size: 0.875rem;
    margin-bottom: 1rem;
}

.machine-card .machine-image {
    width: 100%;
    max-width: 300px;
    height: auto;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

/* Contact section */
.contact-section {
    background: var(--bg-orange-light);
    border: 1px solid var(--boels-orange-200);
    border-radius: 0.5rem;
    padding: 1.5rem;
    margin-top: 3rem;
    text-align: center;
}

.contact-section h3 {
    color: var(--boels-orange-dark);
    margin: 0 0 1rem 0;
}

.contact-section .contact-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Utility classes */
.text-orange {
    color: var(--boels-orange);
}

.bg-orange-light {
    background-color: var(--bg-orange-light);
}

.mt-4 {
    margin-top: 2rem;
}

.mb-4 {
    margin-bottom: 2rem;
}

.text-center {
    text-align: center;
}

/* Construction Worker UI - Large Touch Targets */
.machine-header {
    background: white;
    border-radius: 12px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

/* Emergency Contact - Most Important */
.emergency-contact {
    margin-bottom: 1.5rem;
}

.emergency-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 1.5rem;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: white;
    border-radius: 12px;
    text-decoration: none;
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
    transition: all 0.2s ease;
    min-height: 80px;
}

.emergency-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(220, 38, 38, 0.4);
}

.emergency-btn svg {
    margin-right: 1rem;
    flex-shrink: 0;
}

/* Quick Actions */
.quick-actions {
    display: grid;
    gap: 1rem;
    margin-bottom: 2rem;
    grid-template-columns: 1fr;
}

/* Tablet and Desktop: Side by side buttons */
@media (min-width: 768px) {
    .quick-actions {
        grid-template-columns: 1fr 1fr;
    }
}

/* Force single column in demo mobile view */
.demo-content.mobile-view .quick-actions {
    grid-template-columns: 1fr !important;
}

.action-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    color: white;
    font-weight: 600;
    min-height: 80px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

.action-btn.bg-boels-orange {
    background: linear-gradient(135deg, #FF6900, #E55A00);
}

/* Category Grid */
.category-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    margin-bottom: 2rem;
}

/* Force single column in demo mobile view */
.demo-content.mobile-view .category-grid {
    grid-template-columns: 1fr !important;
}

/* Force single column on small screens */
@media (max-width: 480px) {
    .category-grid {
        grid-template-columns: 1fr !important;
    }
}

@media (min-width: 640px) {
    .category-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.category-btn {
    display: flex;
    align-items: center;
    padding: 1.5rem;
    background: white;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    text-decoration: none;
    transition: all 0.2s ease;
    min-height: 80px;
    cursor: pointer;
    width: 100%;
}

.category-btn:hover,
.category-btn.active {
    border-color: #FF6900;
    background: #FFF4E6;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(255, 105, 0, 0.15);
}

.category-btn.active {
    background: linear-gradient(135deg, #FF6900, #E55A00);
    color: white;
    border-color: #FF6900;
}

.category-icon {
    margin-right: 1rem;
    flex-shrink: 0;
    opacity: 0.8;
}

.category-btn.active .category-icon {
    opacity: 1;
}

.category-text {
    text-align: left;
    flex: 1;
}

/* Search Toggle */
.search-toggle-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 1rem 1.5rem;
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    color: #374151;
    transition: all 0.2s ease;
    cursor: pointer;
    min-height: 60px;
}

.search-toggle-btn:hover {
    background: #f3f4f6;
    border-color: #d1d5db;
}

.search-input {
    width: 100%;
    padding: 1rem 1.5rem;
    font-size: 1.125rem;
    border: 2px solid #e5e7eb;
    border-radius: 8px;
    background: white;
    min-height: 60px;
    transition: border-color 0.2s ease;
}

.search-input:focus {
    outline: none;
    border-color: #FF6900;
    box-shadow: 0 0 0 3px rgba(255, 105, 0, 0.1);
}

/* AI Toggle */
.ai-toggle-btn {
    display: flex;
    align-items: center;
    width: 100%;
    padding: 1.5rem;
    background: #000000;
    color: white;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    min-height: 80px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.ai-toggle-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.ai-icon {
    margin-right: 1rem;
    flex-shrink: 0;
}

/* Chat Modal - Full Screen on mobile, contained on desktop demo */
.chat-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* Desktop demo view - modals inside mockup frames */
@media (min-width: 768px) {
    .demo-content.mobile-view .chat-modal,
    .demo-content.tablet-view .chat-modal,
    .demo-content.desktop-view .chat-modal {
        position: absolute;
        border-radius: inherit;
        overflow: hidden;
        padding: 0;
    }
    
    /* Adjust modal content for mobile mockup */
    .demo-content.mobile-view .chat-modal-content {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        border-radius: 0;
    }
    
    /* Adjust modal content for tablet mockup */
    .demo-content.tablet-view .chat-modal-content {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        border-radius: 0;
    }
}

.chat-modal.hidden {
    display: none;
}

.chat-modal-content {
    background: white;
    width: 100%;
    max-width: 500px;
    height: 100%;
    max-height: 90vh;
    border-radius: 12px;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

/* Full screen on mobile */
@media (max-width: 640px) {
    .chat-modal {
        padding: 0;
    }
    
    .chat-modal-content {
        width: 100%;
        height: 100%;
        max-width: none;
        max-height: none;
        border-radius: 0;
    }
}

.chat-modal-header {
    background: #FF6900;
    color: white;
    padding: 1rem 1.5rem;
    flex-shrink: 0;
}

.chat-modal-icon {
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem;
    border-radius: 8px;
    margin-right: 1rem;
}

.chat-close-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: none;
    padding: 0.5rem;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

.chat-close-btn:hover {
    background: rgba(255, 255, 255, 0.3);
}

.chat-modal-messages {
    flex: 1;
    overflow-y: auto;
    padding: 1rem;
    background: #f9fafb;
    scroll-behavior: smooth;
}

.chat-modal-input {
    background: white;
    padding: 1rem;
    border-top: 1px solid #e5e7eb;
    flex-shrink: 0;
}

.chat-form {
    display: flex;
    gap: 0.75rem;
}

.chat-input-field {
    flex: 1;
    padding: 1rem;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 1rem;
    min-height: 48px;
}

.chat-input-field:focus {
    outline: none;
    border-color: #FF6900;
    box-shadow: 0 0 0 3px rgba(255, 105, 0, 0.1);
}

.chat-send-btn {
    background: #FF6900;
    color: white;
    border: none;
    padding: 0.75rem;
    border-radius: 8px;
    cursor: pointer;
    min-width: 48px;
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
}

.chat-send-btn:hover {
    background: #E55A00;
}

.chat-send-btn:disabled {
    background: #9ca3af;
    cursor: not-allowed;
}

/* Help Section */
.help-section {
    margin-top: 3rem;
}

.help-card {
    background: white;
    padding: 2rem;
    border-radius: 12px;
    border: 1px solid #e5e7eb;
    text-align: center;
}

.help-buttons {
    display: grid;
    gap: 1rem;
}

/* Force single column in demo mobile view */
.demo-content.mobile-view .help-buttons {
    grid-template-columns: 1fr !important;
}

.help-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    padding: 1.5rem;
    border-radius: 12px;
    text-decoration: none;
    color: white;
    min-height: 80px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}

.help-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
}

/* FAQ Mobile Show More functionality */
@media (max-width: 767px) {
    .faq-item-hidden {
        display: none;
    }
    
    .faq-item-hidden.show {
        display: block;
        animation: slideDown 0.3s ease-out;
    }
}

/* Show More button styling */
#show-more-btn {
    transition: all 0.2s ease;
}

#show-more-btn.expanded #show-more-arrow {
    transform: rotate(180deg);
}

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

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

.fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Certificate Modal Styles */
.certificate-modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

/* Desktop demo view - certificate modal inside mockup frames */
@media (min-width: 768px) {
    .demo-content.mobile-view .certificate-modal,
    .demo-content.tablet-view .certificate-modal,
    .demo-content.desktop-view .certificate-modal {
        position: absolute;
        border-radius: inherit;
        overflow: hidden;
        padding: 0;
    }
    
    /* Adjust certificate modal content for mobile mockup */
    .demo-content.mobile-view .certificate-modal-content {
        width: 100%;
        max-width: 100%;
        border-radius: 0.75rem;
        margin: 1rem;
    }
    
    /* Adjust certificate modal content for tablet mockup */
    .demo-content.tablet-view .certificate-modal-content {
        width: 100%;
        max-width: 600px;
        border-radius: 0.75rem;
    }
}

.certificate-modal.hidden {
    display: none;
}

.certificate-modal-content {
    background: white;
    width: 100%;
    max-width: 500px;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
}

.certificate-modal-header {
    display: flex;
    justify-content: between;
    align-items: center;
    padding: 1.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.certificate-modal-body {
    padding: 1.5rem;
}

/* Green action button for certificates */
.action-btn.bg-green-600 {
    background: linear-gradient(135deg, #059669, #047857);
}

.action-btn.bg-green-600:hover {
    background: linear-gradient(135deg, #047857, #065f46);
}

/* Certificate result styles */
.certificate-success {
    padding: 1rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 8px;
    color: #166534;
}

.certificate-error {
    padding: 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    color: #991b1b;
}

/* Responsive Admin Tables - General Utilities */
@media (max-width: 768px) {
    /* Hide desktop tables on mobile */
    .admin-table-desktop {
        display: none !important;
    }
    
    /* Show mobile cards on mobile */
    .admin-table-mobile {
        display: block !important;
    }
    
    /* Navigation responsive improvements */
    .admin-nav {
        padding: 0.5rem 1rem;
    }
    
    .admin-nav .flex {
        flex-direction: column;
        gap: 0.5rem;
        align-items: flex-start;
    }
    
    .admin-nav .flex > div:last-child {
        width: 100%;
        justify-content: space-between;
    }
}

@media (min-width: 769px) {
    /* Show desktop tables on desktop */
    .admin-table-desktop {
        display: block !important;
    }
    
    /* Hide mobile cards on desktop */
    .admin-table-mobile {
        display: none !important;
    }
}

/* General mobile card styles for admin tables */
.admin-mobile-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.admin-mobile-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 0.75rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #f3f4f6;
}

.admin-mobile-card-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.5rem 0;
    border-bottom: 1px solid #f9fafb;
}

.admin-mobile-card-field:last-child {
    border-bottom: none;
}

.admin-mobile-card-label {
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    flex-shrink: 0;
    margin-right: 1rem;
}

.admin-mobile-card-value {
    text-align: right;
    color: #6b7280;
    font-size: 0.875rem;
}

.admin-mobile-card-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid #f3f4f6;
}

.admin-mobile-card-actions a {
    padding: 0.5rem 1rem;
    border-radius: 6px;
    font-size: 0.875rem;
    font-weight: 500;
    text-decoration: none;
    transition: all 0.2s ease;
}

/* Button variants for mobile cards */
.admin-mobile-btn-primary {
    background: var(--boels-orange, #f97316);
    color: white;
}

.admin-mobile-btn-primary:hover {
    background: var(--boels-orange-dark, #ea580c);
}

.admin-mobile-btn-secondary {
    background: #6b7280;
    color: white;
}

.admin-mobile-btn-secondary:hover {
    background: #4b5563;
}

.admin-mobile-btn-danger {
    background: #dc2626;
    color: white;
}

.admin-mobile-btn-danger:hover {
    background: #b91c1c;
}

/* Status badges for mobile */
.admin-status-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 9999px;
}

.admin-status-active {
    background: #dcfce7;
    color: #166534;
}

.admin-status-inactive {
    background: #fef2f2;
    color: #991b1b;
}

.admin-status-warning {
    background: #fefce8;
    color: #a16207;
}

/* Mobile-friendly form improvements */
@media (max-width: 768px) {
    .admin-form-grid {
        grid-template-columns: 1fr !important;
    }
    
    .admin-form-row {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .admin-form-actions {
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .admin-form-actions > * {
        width: 100%;
        text-align: center;
    }
}

/* Touch-friendly interactive elements */
@media (max-width: 768px) {
    .admin-touch-target {
        min-height: 44px;
        min-width: 44px;
        padding: 0.75rem;
    }
    
    /* Make dropdowns and inputs more touch-friendly */
    select, input[type="text"], input[type="email"], input[type="password"], 
    input[type="number"], textarea {
        min-height: 44px;
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* ========================================
   CENTRALIZED ADMIN LAYOUT STYLES
   ======================================== */

/* Admin Header Enhancements */
.admin-header {
    position: sticky;
    top: 0;
    z-index: 40;
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.95);
}

/* Admin Navigation Links */
.admin-nav-link {
    position: relative;
    overflow: hidden;
}

.admin-nav-link::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--wl-primary);
    transform: scaleX(0);
    transition: transform 0.2s ease;
    z-index: -1;
}

.admin-nav-link:hover::before {
    transform: scaleX(1);
}

.admin-nav-link:hover {
    color: white;
    background: transparent;
}

.admin-nav-link.active::before {
    transform: scaleX(1);
}

/* Mobile Menu Improvements */
.mobile-menu {
    backdrop-filter: blur(8px);
    background: rgba(255, 255, 255, 0.98);
}

.mobile-menu .admin-nav-link {
    margin-bottom: 0.25rem;
    border-radius: 0.5rem;
    transition: all 0.2s ease;
}

.mobile-menu .admin-nav-link:hover {
    transform: translateX(4px);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Breadcrumb Enhancements */
.breadcrumb-container {
    background: linear-gradient(to right, #f9fafb, #f3f4f6);
}

/* Admin Content Layout */
.admin-content-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    border: 1px solid #e5e7eb;
    overflow: hidden;
    transition: box-shadow 0.2s ease;
}

.admin-content-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.admin-content-header {
    background: linear-gradient(to right, #f9fafb, #f1f5f9);
    border-bottom: 1px solid #e5e7eb;
    padding: 1.5rem;
}

.admin-content-body {
    padding: 1.5rem;
}

/* Admin Tables */
.admin-table {
    overflow: hidden;
    border-radius: 8px;
    border: 1px solid #e5e7eb;
}

.admin-table th {
    background: linear-gradient(to bottom, #f9fafb, #f3f4f6);
    font-weight: 600;
    color: #374151;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-size: 0.75rem;
}

.admin-table tr:hover {
    background: #f8fafc;
}

.admin-table tr:nth-child(even) {
    background: #fafbfc;
}

.admin-table tr:nth-child(even):hover {
    background: #f1f5f9;
}

/* Admin Action Buttons */
.admin-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    font-size: 0.875rem;
    text-decoration: none;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    cursor: pointer;
}

.admin-btn-primary {
    background: var(--wl-primary);
    color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.admin-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0.9;
}

.admin-btn-secondary {
    background: #6b7280;
    color: white;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.admin-btn-secondary:hover {
    background: #4b5563;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.admin-btn-outline {
    background: transparent;
    color: var(--wl-primary);
    border-color: var(--wl-primary);
}

.admin-btn-outline:hover {
    background: var(--wl-primary);
    color: white;
}

.admin-btn-danger {
    background: #dc2626;
    color: white;
    box-shadow: 0 1px 3px rgba(220, 38, 38, 0.2);
}

.admin-btn-danger:hover {
    background: #b91c1c;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

.admin-btn-success {
    background: #059669;
    color: white;
    box-shadow: 0 1px 3px rgba(5, 150, 105, 0.2);
}

.admin-btn-success:hover {
    background: #047857;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(5, 150, 105, 0.3);
}

/* Admin Form Styling */
.admin-form-group {
    margin-bottom: 1.5rem;
}

.admin-form-label {
    display: block;
    font-weight: 600;
    color: #374151;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.admin-form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: all 0.2s ease;
    background: white;
}

.admin-form-input:focus {
    outline: none;
    border-color: var(--wl-primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.admin-form-input:invalid {
    border-color: #dc2626;
}

.admin-form-textarea {
    resize: vertical;
    min-height: 100px;
}

.admin-form-select {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
    background-position: right 0.5rem center;
    background-repeat: no-repeat;
    background-size: 1.5em 1.5em;
    padding-right: 2.5rem;
}

/* Admin Status Badges */
.admin-status {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.admin-status-active {
    background: #dcfce7;
    color: #166534;
}

.admin-status-inactive {
    background: #fef2f2;
    color: #991b1b;
}

.admin-status-pending {
    background: #fefce8;
    color: #a16207;
}

.admin-status-warning {
    background: #fed7aa;
    color: #9a3412;
}

.admin-status-info {
    background: #dbeafe;
    color: #1e40af;
}

/* Admin Notification/Alert Styles */
.admin-alert {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid;
    display: flex;
    align-items: start;
    gap: 0.75rem;
}

.admin-alert-success {
    background: #f0fdf4;
    border-color: #22c55e;
    color: #166534;
}

.admin-alert-error {
    background: #fef2f2;
    border-color: #ef4444;
    color: #991b1b;
}

.admin-alert-warning {
    background: #fefce8;
    border-color: #eab308;
    color: #a16207;
}

.admin-alert-info {
    background: #eff6ff;
    border-color: #3b82f6;
    color: #1e40af;
}

/* Admin Stats Cards */
.admin-stat-card {
    background: white;
    padding: 1.5rem;
    border-radius: 0.75rem;
    border: 1px solid #e5e7eb;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.admin-stat-card:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.admin-stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: var(--wl-primary);
    line-height: 1;
}

.admin-stat-label {
    font-size: 0.875rem;
    color: #6b7280;
    margin-top: 0.5rem;
    font-weight: 500;
}

.admin-stat-change {
    font-size: 0.75rem;
    margin-top: 0.25rem;
    font-weight: 600;
}

.admin-stat-change.positive {
    color: #059669;
}

.admin-stat-change.negative {
    color: #dc2626;
}

/* Responsive Admin Improvements */
@media (max-width: 768px) {
    .admin-content-header {
        padding: 1rem;
    }
    
    .admin-content-body {
        padding: 1rem;
    }
    
    .admin-btn {
        padding: 0.625rem 1.25rem;
        font-size: 0.8125rem;
    }
    
    .admin-stat-card {
        padding: 1rem;
    }
    
    .admin-stat-value {
        font-size: 1.5rem;
    }
    
    /* Stack admin action buttons on mobile */
    .admin-actions {
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
    }
    
    .admin-actions .admin-btn {
        width: 100%;
        justify-content: center;
    }
}

/* ========================================
   FILE UPLOAD STYLES
   ======================================== */

/* File upload drop zone */
.file-upload-zone {
    border: 2px dashed #d1d5db;
    border-radius: 8px;
    padding: 2rem;
    text-align: center;
    transition: all 0.2s ease;
    background: #fafbfc;
    cursor: pointer;
}

.file-upload-zone:hover {
    border-color: #6b7280;
    background: #f3f4f6;
}

.file-upload-zone.dragover {
    border-color: var(--wl-primary, #3b82f6) !important;
    background: rgba(59, 130, 246, 0.05) !important;
    transform: scale(1.02);
}

/* File upload button styling */
.file-upload-label {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    background: var(--wl-primary, #3b82f6);
    color: white;
    border-radius: 0.5rem;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.875rem;
    transition: all 0.2s ease;
    border: none;
}

.file-upload-label:hover {
    background: var(--wl-primary-dark, #2563eb);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

/* File preview card */
.file-preview-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 0.75rem;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    transition: all 0.2s ease;
}

.file-preview-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.file-preview-icon {
    flex-shrink: 0;
    width: 2.5rem;
    height: 2.5rem;
    background: #f3f4f6;
    border-radius: 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #6b7280;
}

.file-preview-info {
    flex: 1;
    min-width: 0;
}

.file-preview-name {
    font-weight: 600;
    color: #374151;
    font-size: 0.875rem;
    word-break: break-all;
    margin-bottom: 0.25rem;
}

.file-preview-size {
    font-size: 0.75rem;
    color: #6b7280;
}

.file-remove-btn {
    flex-shrink: 0;
    width: 2rem;
    height: 2rem;
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 0.375rem;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.file-remove-btn:hover {
    background: #fee2e2;
    border-color: #fca5a5;
    color: #b91c1c;
    transform: scale(1.05);
}

/* File type specific icons */
.file-icon-pdf {
    color: #dc2626;
    background: #fef2f2;
}

.file-icon-image {
    color: #059669;
    background: #f0fdf4;
}

/* File upload validation messages */
.file-upload-error {
    margin-top: 0.5rem;
    padding: 0.75rem 1rem;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 0.375rem;
    color: #991b1b;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.file-upload-success {
    margin-top: 0.5rem;
    padding: 0.75rem 1rem;
    background: #f0fdf4;
    border: 1px solid #bbf7d0;
    border-radius: 0.375rem;
    color: #166534;
    font-size: 0.875rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Progress bar for file upload */
.file-upload-progress {
    width: 100%;
    height: 0.5rem;
    background: #f3f4f6;
    border-radius: 0.25rem;
    overflow: hidden;
    margin-top: 0.75rem;
}

.file-upload-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--wl-primary, #3b82f6), var(--wl-primary-dark, #2563eb));
    border-radius: 0.25rem;
    transition: width 0.3s ease;
    position: relative;
}

.file-upload-progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(
        90deg, 
        transparent, 
        rgba(255, 255, 255, 0.2), 
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Mobile optimizations for file upload */
@media (max-width: 768px) {
    .file-upload-zone {
        padding: 1.5rem 1rem;
    }
    
    .file-upload-label {
        padding: 1rem 1.5rem;
        font-size: 1rem;
        min-height: 44px;
    }
    
    .file-preview-card {
        padding: 0.75rem;
        gap: 0.75rem;
    }
    
    .file-preview-name {
        font-size: 0.8125rem;
    }
    
    .file-remove-btn {
        width: 2.5rem;
        height: 2.5rem;
        min-width: 44px;
        min-height: 44px;
    }
    
    /* Make file input more touch-friendly */
    .file-upload-zone input[type="file"] {
        position: absolute;
        width: 100%;
        height: 100%;
        opacity: 0;
        cursor: pointer;
    }
}

/* Dark mode support for file upload */
@media (prefers-color-scheme: dark) {
    .file-upload-zone {
        background: #1f2937;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .file-upload-zone:hover {
        background: #111827;
        border-color: #6b7280;
    }
    
    .file-preview-card {
        background: #1f2937;
        border-color: #4b5563;
        color: #f9fafb;
    }
    
    .file-preview-icon {
        background: #374151;
        color: #9ca3af;
    }
    
    .file-preview-name {
        color: #f9fafb;
    }
    
    .file-preview-size {
        color: #9ca3af;
    }
}

/* Dark mode support for admin */
@media (prefers-color-scheme: dark) {
    .admin-header {
        background: rgba(17, 24, 39, 0.95);
        border-color: #374151;
    }
    
    .admin-content-card {
        background: #1f2937;
        border-color: #374151;
    }
    
    .admin-content-header {
        background: linear-gradient(to right, #111827, #1f2937);
        border-color: #374151;
    }
    
    .admin-table th {
        background: linear-gradient(to bottom, #111827, #1f2937);
        color: #d1d5db;
    }
    
    .admin-form-input {
        background: #1f2937;
        border-color: #374151;
        color: #f9fafb;
    }
    
    .admin-form-input:focus {
        border-color: var(--wl-primary);
        background: #111827;
    }
}

/* ========================================
   RESPONSIVE DEMO SHOWCASE STYLES
   ======================================== */

/* Demo Device Button Styles - Modern Design */
.demo-device-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    border: none;
    border-radius: 0.75rem;
    background: #f8fafc;
    color: #64748b;
    font-size: 0.75rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    outline: none;
    text-decoration: none;
    position: relative;
    overflow: hidden;
    min-height: 56px;
    min-width: 64px;
}

.demo-device-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(37, 99, 235, 0.1));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 0.75rem;
}

.demo-device-btn:hover::before {
    opacity: 1;
}

.demo-device-btn:hover {
    color: #3b82f6;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    background: #ffffff;
}

.demo-device-btn.active {
    background: linear-gradient(135deg, #3b82f6, #2563eb);
    color: white;
    box-shadow: 
        0 4px 14px rgba(59, 130, 246, 0.4),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.demo-device-btn.active::before {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), rgba(255, 255, 255, 0.05));
    opacity: 1;
}

.demo-device-btn.active:hover {
    transform: translateY(-2px);
    box-shadow: 
        0 6px 20px rgba(59, 130, 246, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.3);
}

.demo-device-btn svg {
    flex-shrink: 0;
    position: relative;
    z-index: 1;
}

/* Demo Viewport Container - No styling on mobile */
@media (max-width: 767px) {
    .demo-viewport-container {
        background: none !important;
        padding: 0 !important;
        min-height: auto !important;
        display: block !important;
    }
    
    .demo-content {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
        margin: 0 !important;
        padding: 0 !important;
        background: white !important;
        overflow: visible !important;
    }
    
    /* Remove all viewport classes on mobile */
    .demo-content.mobile-view,
    .demo-content.tablet-view,
    .demo-content.desktop-view,
    .demo-content.full-view {
        width: 100% !important;
        max-width: 100% !important;
        height: auto !important;
        border: none !important;
        border-radius: 0 !important;
        box-shadow: none !important;
    }
    
    /* Remove all pseudo elements on mobile */
    .demo-content::before,
    .demo-content::after,
    .demo-content.mobile-view::before,
    .demo-content.mobile-view::after,
    .demo-content.desktop-view::after {
        display: none !important;
    }
    
    /* Remove forced single column on real mobile devices */
    .demo-content.mobile-view .category-grid,
    .demo-content.mobile-view .quick-actions,
    .demo-content.mobile-view .help-buttons {
        grid-template-columns: initial !important;
    }
}

/* Desktop only - Demo styling */
@media (min-width: 768px) {
    .demo-viewport-container {
        background: 
            linear-gradient(rgba(255, 255, 255, 0.85), rgba(255, 255, 255, 0.85)),
            url('https://images.unsplash.com/photo-1580901369227-308f6f40bdeb?w=1472&auto=format&fit=crop') center/cover;
        min-height: calc(100vh - 200px);
        padding: 3rem 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        overflow: auto;
        position: relative;
    }
}

/* Base demo content */
.demo-content {
    background: white;
    position: relative;
    width: 100%;
    height: auto;
}

/* Desktop only - Apply transitions and viewport frames */
@media (min-width: 768px) {
    .demo-content {
        transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
        transform-origin: center center;
        overflow-y: auto;
        overflow-x: hidden;
    }
    
    /* Mobile View - iPhone mockup (Desktop only) */
    .demo-content.mobile-view {
        width: 375px !important;
        height: 667px !important;
        max-width: 375px !important;
        max-height: 667px !important;
        border-radius: 36px;
        border: 12px solid #1a1a1a;
        box-shadow: 
            0 0 0 2px #333,
            0 20px 40px rgba(0, 0, 0, 0.4),
            inset 0 0 0 1px rgba(255, 255, 255, 0.1);
        position: relative;
        margin: 0 auto;
        background: white;
        overflow: hidden;
    }
}

/* Desktop only - Device frames and mockups */
@media (min-width: 768px) {
    /* Scrollable content inside mobile frame */
    .demo-content.mobile-view > * {
        height: 100%;
        overflow-y: auto;
        overflow-x: hidden;
    }

    /* iPhone notch */
    .demo-content.mobile-view::before {
        content: '';
        position: absolute;
        top: 0;
        left: 50%;
        transform: translateX(-50%);
        width: 150px;
        height: 25px;
        background: #1a1a1a;
        border-radius: 0 0 20px 20px;
        z-index: 900;
    }

    /* iPhone home indicator */
    .demo-content.mobile-view::after {
        content: '';
        position: absolute;
        bottom: 8px;
        left: 50%;
        transform: translateX(-50%);
        width: 135px;
        height: 4px;
        background: #333;
        border-radius: 2px;
        z-index: 900;
    }

    /* Tablet View - iPad mockup */
    .demo-content.tablet-view {
        width: 768px !important;
        height: 1024px !important;
        max-width: 768px !important;
        max-height: 1024px !important;
        border-radius: 28px;
        border: 16px solid #2d2d2d;
        box-shadow: 
            0 0 0 1px #444,
            0 15px 35px rgba(0, 0, 0, 0.3);
        margin: 0 auto;
        background: white;
        overflow: hidden;
    }

    /* Scrollable content inside tablet frame */
    .demo-content.tablet-view > * {
        height: 100%;
        overflow-y: auto;
        overflow-x: hidden;
    }

    /* Desktop View - Large Monitor mockup */
    .demo-content.desktop-view {
        width: calc(100vw - 100px) !important;
        height: calc(100vh - 240px) !important;
        max-width: 1600px !important;
        max-height: 900px !important;
        border-radius: 12px;
        border: 3px solid #1f2937;
        box-shadow: 
            0 0 0 8px #111827,
            0 30px 60px rgba(0, 0, 0, 0.3);
        margin: 0 auto;
        background: white;
        position: relative;
        overflow: hidden;
    }

    /* Scrollable content inside desktop frame */
    .demo-content.desktop-view > * {
        height: 100%;
        overflow-y: auto;
        overflow-x: hidden;
    }

    /* Desktop stand */
    .demo-content.desktop-view::after {
        content: '';
        position: absolute;
        bottom: -40px;
        left: 50%;
        transform: translateX(-50%);
        width: 200px;
        height: 40px;
        background: linear-gradient(to bottom, #1f2937, #111827);
        clip-path: polygon(40% 0%, 60% 0%, 70% 100%, 30% 100%);
        z-index: -1;
    }

}

/* Responsive Scaling for smaller screens */
@media (min-width: 768px) and (max-width: 1200px) {
    .demo-content.tablet-view {
        transform: scale(0.85);
    }
    
    .demo-content.mobile-view {
        transform: scale(0.95);
    }
}

/* Smooth Scale Animation */
.demo-content.scaling {
    transition: all 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

/* Demo Label Indicator */
.demo-label {
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    z-index: 20;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.demo-content:hover .demo-label {
    opacity: 1;
}

/* Loading State */
.demo-loading {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: rgba(255, 255, 255, 0.95);
    padding: 1rem 2rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 30;
}

.demo-loading.hidden {
    display: none;
}

.demo-spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top: 2px solid #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Demo Showcase Bar Responsive */
@media (max-width: 768px) {
    .demo-device-btn span {
        display: none !important;
    }
    
    .demo-device-btn {
        padding: 0.5rem;
        min-width: 48px;
        min-height: 48px;
    }
    
    .demo-device-btn svg {
        margin-bottom: 0 !important;
    }
}


/* Accessibility Improvements */
.demo-device-btn:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Demo Content Scrollbar Styling */
.demo-content::-webkit-scrollbar {
    width: 8px;
}

.demo-content::-webkit-scrollbar-track {
    background: #f1f5f9;
    border-radius: 4px;
}

.demo-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

.demo-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* Language Switcher Styles */
.language-switcher {
    position: relative;
    display: inline-block;
}

.language-current {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.875rem;
    font-weight: 500;
    color: #374151;
    min-height: 40px;
}

.language-current:hover {
    background: #f9fafb;
    border-color: #d1d5db;
}

.language-current .flag {
    font-size: 1.25rem;
    line-height: 1;
}

.language-dropdown {
    position: absolute;
    top: calc(100% + 0.25rem);
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    min-width: 180px;
    overflow: hidden;
    animation: slideDown 0.2s ease;
}

.language-dropdown.hidden {
    display: none;
}

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

.language-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    color: #374151;
    text-decoration: none;
    transition: background 0.2s ease;
    font-size: 0.875rem;
    font-weight: 500;
}

.language-option:hover {
    background: #f9fafb;
}

.language-option.active {
    background: #eff6ff;
    color: #2563eb;
}

.language-option .flag {
    font-size: 1.25rem;
    line-height: 1;
}

/* Mobile responsive */
@media (max-width: 640px) {
    .language-current .lang-name {
        display: none !important;
    }
    
    .language-current {
        padding: 0.5rem;
        min-width: 44px;
        justify-content: center;
    }
    
    .language-dropdown {
        right: -1rem;
    }
}

/* Dark mode support for language switcher */
@media (prefers-color-scheme: dark) {
    .language-current {
        background: #1f2937;
        border-color: #374151;
        color: #d1d5db;
    }
    
    .language-current:hover {
        background: #374151;
        border-color: #4b5563;
    }
    
    .language-dropdown {
        background: #1f2937;
        border-color: #374151;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
    }
    
    .language-option {
        color: #d1d5db;
    }
    
    .language-option:hover {
        background: #374151;
    }
    
    .language-option.active {
        background: #1e3a8a;
        color: #3b82f6;
    }
}

/* Dark mode support for responsive demo */
@media (prefers-color-scheme: dark) {
    .demo-viewport-container {
        background: #111827;
    }
    
    .demo-device-btn {
        background: #1f2937;
        color: #9ca3af;
    }
    
    .demo-device-btn:hover {
        color: #d1d5db;
        background: #374151;
    }
    
    .demo-content {
        background: #1f2937;
    }
    
    .demo-loading {
        background: rgba(31, 41, 55, 0.95);
        color: #f9fafb;
    }
    
    .demo-content::-webkit-scrollbar-track {
        background: #374151;
    }
    
    .demo-content::-webkit-scrollbar-thumb {
        background: #6b7280;
    }
    
    .demo-content::-webkit-scrollbar-thumb:hover {
        background: #9ca3af;
    }
}