/**
 * Plandi - Mobil Uyumlu Responsive Stiller
 * Harika mobil deneyim için
 */

/* Safe area - çentikli ekranlar için */
@supports (padding: max(0px)) {
    .safe-top { padding-top: max(0.5rem, env(safe-area-inset-top)); }
    .safe-bottom { padding-bottom: max(0.5rem, env(safe-area-inset-bottom)); }
    .safe-left { padding-left: max(0.5rem, env(safe-area-inset-left)); }
    .safe-right { padding-right: max(0.5rem, env(safe-area-inset-right)); }
}

/* Dokunmatik hedefler - min 44px */
.touch-target {
    min-height: 44px;
    min-width: 44px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Mobil sidebar overlay */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 40;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s, visibility 0.25s;
}
.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Admin/Dashboard sidebar - mobilde drawer */
@media (max-width: 767px) {
    .sidebar-mobile-drawer {
        position: fixed;
        top: 0;
        left: 0;
        height: 100%;
        width: 280px;
        max-width: 85vw;
        z-index: 50;
        transform: translateX(-100%);
        transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
        box-shadow: 4px 0 24px rgba(0,0,0,0.12);
    }
    .sidebar-mobile-drawer.open {
        transform: translateX(0);
    }
    .sidebar-mobile-drawer + .main-content {
        margin-left: 0 !important;
    }
}

/* Mobil header - sabit üst bar */
.mobile-header {
    position: sticky;
    top: 0;
    z-index: 30;
    -webkit-backdrop-filter: blur(12px);
    backdrop-filter: blur(12px);
}

/* Tab navigasyon - mobilde scroll */
.nav-tabs-scroll {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
    -ms-overflow-style: none;
}
.nav-tabs-scroll::-webkit-scrollbar {
    display: none;
}

/* Kartlar - mobilde tam genişlik, dokunmatik alan */
@media (max-width: 639px) {
    .card-mobile-full {
        margin-left: -1rem;
        margin-right: -1rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
}

/* Form elemanları - mobilde büyük */
@media (max-width: 639px) {
    input, select, textarea, button {
        font-size: 16px !important; /* iOS zoom önleme */
    }
}

/* Flex wrap - mobilde dikey */
@media (max-width: 639px) {
    .flex-mobile-col {
        flex-direction: column;
        align-items: stretch;
    }
    .flex-mobile-col > * {
        width: 100%;
    }
}

/* Gizle/göster - breakpoint bazlı */
@media (max-width: 767px) {
    .hide-mobile { display: none !important; }
}
@media (min-width: 768px) {
    .hide-desktop { display: none !important; }
}

/* Padding - mobilde azalt */
@media (max-width: 639px) {
    .p-mobile-sm {
        padding-left: 1rem;
        padding-right: 1rem;
        padding-top: 1rem;
        padding-bottom: 1rem;
    }
}

/* Grid - mobilde 1 kolon */
@media (max-width: 639px) {
    .grid-responsive-1 {
        grid-template-columns: 1fr !important;
    }
}

/* Dashboard mobil - genel font küçültme */
@media (max-width: 639px) {
    .issue-title { font-size: 0.95rem !important; }
    .issue-item .p-6 { padding: 1rem 1.25rem !important; }
    .issue-item .w-12 { width: 2.5rem !important; height: 2.5rem !important; }
    .issue-item .w-6 { width: 1.25rem !important; height: 1.25rem !important; }
}
