/* Panel Mobile CSS */
/* Mevcut stiller korunacak */

/* Logout Button Styles */
.panel-plugin button[data-logout] {
    width: 100%;
    text-align: left;
    border: none;
    background: none;
    outline: none;
}

.panel-plugin button[data-logout]:hover {
    background-color: transparent;
    color: #dc2626;
}

.panel-plugin button[data-logout]:hover svg {
    color: #dc2626;
    stroke: #dc2626;
}

.panel-plugin button[data-logout]:hover svg path {
    stroke: #dc2626;
}

.panel-plugin button[data-logout]:hover span {
    color: #dc2626;
}

.panel-plugin button[data-logout]:disabled {
    opacity: 0.75;
    cursor: not-allowed;
}

/* Force hide mobile menu on desktop */
@media (min-width: 768px) {
    .mobile-bottom-spacer,
    .mobile-menu-container,
    .mobile-menu-container * {
        display: none;
    }
}

/* Hide panel sidebar on mobile devices */
@media (max-width: 767px) {
    #panel-sidebar {
        display: none;
    }
    
    /* Adjust main content to take full width on mobile */
    .panel-content-wrapper {
        flex-direction: column;
    }
    
    .panel-main-content {
        width: 100%;
        margin-left: 0;
    }
}

/* Panel Shortcode Styles */
.panel-shortcode-wrapper {
    min-height: 100vh;
    background-color: var(--color-background, #1f2937);
}

.panel-light-theme {
    background-color: #f9fafb;
    color: #1f2937;
}

.panel-dark-theme {
    background-color: #1f2937;
    color: #f9fafb;
}

/* Panel Sidebar Shortcode Styles */
.panel-sidebar-shortcode-wrapper {
    background-color: var(--color-background, #1f2937);
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.panel-sidebar-horizontal nav {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.panel-sidebar-vertical nav {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
}

.panel-sidebar-shortcode-wrapper nav a {
    display: flex;
    align-items: center;
    padding: 0.75rem;
    border-radius: 0.5rem;
    text-decoration: none;
    transition: all 0.2s ease-in-out;
    font-weight: 500;
}

.panel-sidebar-shortcode-wrapper nav a:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

.panel-sidebar-shortcode-wrapper nav a svg,
.panel-sidebar-shortcode-wrapper nav a span {
    transition: all 0.2s ease-in-out;
}

/* Light theme styles */
.panel-light-theme.panel-sidebar-shortcode-wrapper {
    background-color: #ffffff;
    border: 1px solid #e5e7eb;
}

.panel-light-theme.panel-sidebar-shortcode-wrapper nav a {
    color: #374151;
    background-color: #f9fafb;
}

.panel-light-theme.panel-sidebar-shortcode-wrapper nav a:hover {
    background-color: #f3f4f6;
    color: #1f2937;
}

.panel-light-theme.panel-sidebar-shortcode-wrapper nav a.bg-blue-600 {
    background-color: #2563eb;
    color: #ffffff;
}

/* Dark theme styles */
.panel-dark-theme.panel-sidebar-shortcode-wrapper {
    background-color: #374151;
    border: 1px solid #4b5563;
}

.panel-dark-theme.panel-sidebar-shortcode-wrapper nav a {
    color: #d1d5db;
    background-color: #4b5563;
}

.panel-dark-theme.panel-sidebar-shortcode-wrapper nav a:hover {
    background-color: #6b7280;
    color: #ffffff;
}

.panel-dark-theme.panel-sidebar-shortcode-wrapper nav a.bg-blue-600 {
    background-color: #2563eb;
    color: #ffffff;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .panel-sidebar-horizontal nav {
        flex-direction: column;
        gap: 0.25rem;
    }
    
    .panel-sidebar-shortcode-wrapper nav a {
        justify-content: flex-start;
    }
}

/* Icon-only mode */
.panel-sidebar-shortcode-wrapper nav a:has(span:empty) {
    justify-content: center;
    min-width: 3rem;
    min-height: 3rem;
}

/* Label-only mode */
.panel-sidebar-shortcode-wrapper nav a:has(svg:empty) {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* Compact mode for horizontal */
.panel-sidebar-horizontal.panel-sidebar-shortcode-wrapper nav a {
    padding: 0.5rem 0.75rem;
    font-size: 0.875rem;
}

/* Full width mode */
.panel-sidebar-shortcode-wrapper.panel-sidebar-horizontal nav {
    width: 100%;
}

.panel-sidebar-shortcode-wrapper.panel-sidebar-horizontal nav a {
    flex: 1;
    justify-content: center;
    text-align: center;
}

/* Panel Mobile Styles */
/* Mobile-specific improvements for panel content visibility */

/* Hide scrollbars globally */
.scrollbar-hide {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

.scrollbar-hide::-webkit-scrollbar {
    display: none;  /* Chrome, Safari and Opera */
}

/* Additional scrollbar hiding for mobile navigation */
.mobile-menu-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

.mobile-menu-container::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.mobile-menu-container::-webkit-scrollbar-track {
    display: none;
}

.mobile-menu-container::-webkit-scrollbar-thumb {
    display: none;
}

/* Force hide scrollbars for mobile navigation specifically */
.mobile-menu-container,
.mobile-menu-container * {
    scrollbar-width: none;
    -ms-overflow-style: none;
}

.mobile-menu-container::-webkit-scrollbar,
.mobile-menu-container *::-webkit-scrollbar {
    display: none;
    width: 0;
    height: 0;
}

.mobile-menu-container::-webkit-scrollbar-track,
.mobile-menu-container *::-webkit-scrollbar-track {
    display: none;
}

.mobile-menu-container::-webkit-scrollbar-thumb,
.mobile-menu-container *::-webkit-scrollbar-thumb {
    display: none;
}

@media (max-width: 768px) {
    /* Ensure content can scroll properly on mobile */
    .panel-content-container {
        min-height: calc(var(--vh, 1vh) * 100 - 3rem); /* Reduced from 4rem - Account for mobile bottom nav */
        padding-bottom: 4rem; /* Reduced from 5rem - Extra padding to prevent content being hidden behind bottom nav */
    }
    
    /* Improve content section scrolling */
    .content-section {
        min-height: calc(var(--vh, 1vh) * 100 - 3rem); /* Reduced from 4rem */
        overflow-y: auto;
        -webkit-overflow-scrolling: touch; /* Smooth scrolling on iOS */
    }
    
    /* Ensure main content area can scroll */
    .panel-main-content {
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 4rem; /* Reduced from 5rem */
    }
    
    /* Fix for content being cut off */
    .panel-content-wrapper {
        min-height: calc(var(--vh, 1vh) * 100);
        display: flex;
        flex-direction: column;
    }
    
    /* Ensure proper spacing for mobile bottom navigation */
    .mobile-bottom-spacer {
        height: 3rem; /* Reduced from 4rem */
        width: 100%;
    }
    

    
    /* Ensure content doesn't get hidden behind mobile nav */
    .content-section > *:last-child {
        margin-bottom: 4rem; /* Reduced from 5rem */
    }
    
    /* Improve content section padding */
    .content-section {
        padding-bottom: 4rem; /* Reduced from 6rem */
    }
    

    
    /* Improve mobile menu item spacing */
    .mobile-menu-item {
        min-height: 3rem;
        padding: 0.5rem 0.25rem;
        flex-shrink: 0;
    }
    
    /* Better touch targets for mobile */
    .mobile-menu-item svg {
        width: 1.25rem;
        height: 1.25rem;
    }
    
    .mobile-menu-item span {
        font-size: 0.75rem;
        line-height: 1;
    }
    
    /* Horizontal scroll for mobile navigation */
    .mobile-menu-container {
        -webkit-overflow-scrolling: touch;
        scroll-behavior: smooth;
        overflow-x: auto;
        overflow-y: hidden;
    }
}

/* Additional improvements for very small screens */
@media (max-width: 480px) {
    .panel-content-container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .content-section {
        padding-bottom: 4rem; /* Reduced from 6rem */
    }
    
    .mobile-menu-item {
        padding: 0.25rem 0.125rem;
        min-width: 3.5rem;
    }
    
    .mobile-menu-item span {
        font-size: 0.7rem;
    }
    
    /* Ensure mobile navigation scrolls properly on very small screens */
    .mobile-menu-container {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
}

/* Ensure proper scrolling behavior */
html, body {
    overflow-x: hidden;
}

/* Fix for iOS Safari viewport issues */
@supports (-webkit-touch-callout: none) {
    .panel-content-wrapper {
        min-height: calc(var(--vh, 1vh) * 100);
    }
    
    .content-section {
        min-height: calc(var(--vh, 1vh) * 100 - 3rem); /* Reduced from 4rem */
    }
    
    .panel-content-container {
        min-height: calc(var(--vh, 1vh) * 100 - 3rem); /* Reduced from 4rem */
    }
}

/* Settings Page Styles */
.settings-section {
    min-height: 100%;
}

/* Mobile padding for settings section to prevent header overlap */
@media (max-width: 1023px) {
    .settings-section {
        padding-top: var(--header-height, 20px);
    }
    
    /* Additional padding for main content area - reduced */
    .main-content-area {
        padding-top: 0.5rem;
    }
    
    /* Mobile menu toggle button padding - reduced */
    .lg\\:hidden.mb-4 {
        margin-top: 0.5rem;
    }
}

.settings-sidebar-container {
    transition: all 0.3s ease;
}

.settings-sidebar-item {
    transition: all 0.2s ease;
}

.settings-sidebar-item:hover {
    transform: translateX(2px);
}

.settings-content-container {
    min-height: 500px;
}

/* Settings Sidebar Mobile Toggle */
@media (max-width: 1023px) {
    #settings-sidebar-menu {
        transition: all 0.3s ease;
        overflow: hidden;
    }
    
    #settings-sidebar-menu.hidden {
        max-height: 0;
        opacity: 0;
    }
    
    #settings-sidebar-menu:not(.hidden) {
        max-height: 500px;
        opacity: 1;
    }
    
    #settings-sidebar-toggle-icon {
        transition: transform 0.3s ease;
    }
    
    #settings-sidebar-toggle-icon.rotated {
        transform: rotate(180deg);
    }
}

/* Mobile Settings Menu Slide */
@media (max-width: 1023px) {
    #mobile-settings-menu-overlay {
        z-index: 9999;
    }
    
    #mobile-settings-menu-slide {
        z-index: 10000;
        max-width: 320px;
        /* Position below header */
        top: var(--header-height, 0px);
        height: calc(100vh - var(--header-height, 0px));
    }
    
    #mobile-settings-menu-toggle {
        transition: all 0.2s ease;
    }
    
    #mobile-settings-menu-toggle:active {
        transform: scale(0.98);
    }
    
    #mobile-menu-toggle-icon {
        transition: transform 0.3s ease;
    }
    
    /* Prevent body scroll when menu is open */
    body.mobile-menu-open {
        overflow: hidden;
        position: fixed;
        width: 100%;
    }
    
    /* Menu slide animation */
    #mobile-settings-menu-slide {
        will-change: transform;
    }
    
    /* Touch improvements */
    #mobile-settings-menu-slide nav a {
        min-height: 48px;
        touch-action: manipulation;
    }
}

/* Profile Settings Styles */
.profile-settings .bg-gray-700 {
    background-color: #374151;
}

.profile-settings .bg-gray-600 {
    background-color: #4b5563;
}

.profile-settings .bg-gray-800 {
    background-color: #1f2937;
}

.profile-settings input:focus,
.profile-settings textarea:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Security Settings Styles */
.security-settings .bg-gray-700 {
    background-color: #374151;
}

.security-settings .bg-gray-600 {
    background-color: #4b5563;
}

.security-settings .bg-gray-800 {
    background-color: #1f2937;
}

.security-settings input:focus {
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Password Strength Indicator */
#password-strength-bar {
    width: 0%;
    transition: all 0.3s ease;
}

#password-strength-bar.weak {
    width: 25%;
    background-color: #ef4444;
}

#password-strength-bar.fair {
    width: 50%;
    background-color: #f59e0b;
}

#password-strength-bar.good {
    width: 75%;
    background-color: #10b981;
}

#password-strength-bar.strong {
    width: 100%;
    background-color: #059669;
}

/* Form Validation Styles */
.form-error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-success {
    border-color: #10b981;
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.1);
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #ffffff;
    border-top: 2px solid transparent;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

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

/* Responsive Adjustments for Settings */
@media (max-width: 768px) {
    
    .settings-sidebar-container {
        margin-bottom: 1rem;
    }
    
    .settings-content-container {
        padding: 1rem;
    }
    
    .profile-settings .grid,
    .security-settings .grid {
        grid-template-columns: 1fr;
    }
    
    .profile-settings .flex-col.sm\\:flex-row {
        flex-direction: column;
    }
    
    .profile-settings .flex-col.sm\\:flex-row .flex-shrink-0 {
        align-self: center;
        margin-bottom: 1rem;
    }
}

/* Animation for smooth transitions */
.settings-sidebar-item,
.settings-content-container,
.profile-settings .bg-gray-700,
.security-settings .bg-gray-700 {
    transition: all 0.2s ease;
}

/* Focus states for accessibility */
.settings-sidebar-item:focus,
.profile-settings button:focus,
.security-settings button:focus {
    outline: 2px solid #3b82f6;
    outline-offset: 2px;
}

/* Hover effects */
.settings-sidebar-item:hover {
    background-color: #4b5563;
}

.profile-settings button:hover,
.security-settings button:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* More menu positioning is now handled by JavaScript */

/* Force more menu to be clickable */
#more-menu-dropdown {
    pointer-events: auto;
}

#more-menu-dropdown a {
    pointer-events: auto;
    cursor: pointer;
}

/* Global sidebar site branding control moved to Core Asset Manager */

/* Mobile Header Search Positioning */
@media (max-width: 1023px) {
    /* Ensure mobile search is positioned correctly in header */
    .site-header .flex.items-center.space-x-2 {
        gap: 0.5rem;
        position: relative;
    }
    
    /* Mobile search container positioning - normal state */
    .mobile-search-container:not(.expanded) {
        order: -1; /* Place before hamburger menu */
        flex-shrink: 0; /* Prevent shrinking */
        transition: all 0.3s ease;
    }
    
    /* When expanded, ensure it overlays properly */
    .mobile-search-container.expanded {
        z-index: 60;
        position: absolute;
        left: 0;
        right: 0;
        top: 50%;
        transform: translateY(-50%);
    }
    
    /* Hamburger menu button positioning */
    .mobile-menu-toggle {
        order: 0; /* Place after search */
        flex-shrink: 0; /* Prevent shrinking */
        z-index: 50; /* Below expanded search */
    }
    
    /* Keep other header elements visible when search is expanded */
    .mobile-search-container.expanded ~ * {
        opacity: 1;
        pointer-events: auto;
    }
    
    /* Keep search visible */
    .mobile-search-container.expanded {
        opacity: 1;
        pointer-events: auto;
    }
}

@media (max-width: 768px) {
    /* Tighter spacing on smaller mobile screens */
    .site-header .flex.items-center.space-x-2 {
        gap: 0.25rem;
        position: relative;
    }
    
    /* Mobile search container adjustments - normal state */
    .mobile-search-container:not(.expanded) {
        order: -1;
        margin-right: 0.25rem;
    }
    
    /* Search icon positioning for collapsed state */
    .mobile-search-container:not(.expanded) .search-icon-button {
        position: absolute;
        right: 8px;
        top: 50%;
        transform: translateY(-50%);
        pointer-events: none;
        color: #9ca3af;
        opacity: 0.7;
    }
    
    /* Hamburger menu adjustments */
    .mobile-menu-toggle {
        order: 0;
        padding: 0.5rem;
    }
    
    /* Header overflow handling when search expanded */
    .site-header {
        overflow: visible;
        position: relative;
    }
}
