/* Responsive Improvements CSS */

/* ===== RESPONSIVE CHANGE CONTAINER ===== */
.responsive-change-container {
    min-width: auto;
    width: auto;
}

@media (min-width: 768px) {
    .responsive-change-container {
        min-width: 120px;
    }
}

@media (max-width: 575px) {
    .responsive-change-container {
        min-width: 80px;
    }
    
    .responsive-change-container .change-badge {
        font-size: 0.875rem;
        padding: 0.25rem 0.5rem;
    }
}

/* ===== MOBILE TOUCH TARGETS ===== */
@media (max-width: 767px) {
    /* Ensure minimum 44px touch target size */
    .btn,
    .btn-sm,
    .btn-favorite,
    .nav-link,
    .dropdown-item {
        min-height: 44px;
        min-width: 44px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    /* Increase spacing between interactive elements */
    .btn-group > .btn,
    .nav-item {
        margin: 0.25rem;
    }
}

/* ===== NOTIFICATION DROPDOWN RESPONSIVE ===== */
@media (max-width: 575px) {
    .notifications-dropdown {
        width: 100vw !important;
        max-width: 100vw !important;
        left: 0 !important;
        right: 0 !important;
        transform: translateX(-50%);
        border-radius: 0;
    }
}

/* ===== MEGA MENU RESPONSIVE ===== */
@media (max-width: 991px) {
    .mega-menu {
        position: relative !important;
        width: 100% !important;
        max-width: 100% !important;
        left: auto !important;
        transform: none !important;
        padding: 1rem;
    }
    
    .mega-menu .row {
        margin: 0;
    }
    
    .mega-menu .col-lg-4 {
        margin-bottom: 1.5rem;
    }
    
    .mega-menu .col-lg-4:last-child {
        margin-bottom: 0;
    }
}

/* ===== PRICE CARD RESPONSIVE ===== */
@media (max-width: 575px) {
    .modern-price-card {
        padding: 0.75rem;
        margin-bottom: 0.5rem;
    }
    
    .modern-price-card .asset-name {
        font-size: 0.9rem;
    }
    
    .modern-price-card .asset-symbol {
        font-size: 0.75rem;
    }
    
    .modern-price-card .price-value {
        font-size: 1rem;
    }
    
    .modern-price-card .change-badge-sm {
        font-size: 0.75rem;
        padding: 0.125rem 0.375rem;
    }
}

/* ===== FIXED ADSENSE RESPONSIVE ===== */
@media (max-width: 320px) {
    ins.adsbygoogle {
        max-width: 100vw !important;
        overflow: hidden !important;
    }
    
    .adsense-zone {
        max-width: 100vw;
        overflow-x: hidden;
    }
}

/* ===== TABLE RESPONSIVE IMPROVEMENTS ===== */
.table-responsive {
    -webkit-overflow-scrolling: touch;
    position: relative;
}

/* Add scroll hint for tables */
.table-responsive::before {
    content: '← Kaydır →';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(255, 255, 255, 0.95);
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s;
}

.table-responsive.show-scroll-hint::before {
    opacity: 1;
}

/* Hide scroll hint after user starts scrolling */
.table-responsive.scrolled::before {
    opacity: 0;
}

/* ===== NAVBAR SEARCH RESPONSIVE ===== */
@media (max-width: 575px) {
    .navbar .search-input {
        font-size: 16px; /* Prevent zoom on iOS */
        width: 100%;
        max-width: none;
    }
    
    .navbar .search-input:focus {
        width: 100%;
    }
}

/* ===== CARD GRID RESPONSIVE ===== */
@media (max-width: 575px) {
    .row > [class*="col-"] {
        padding-left: 0.5rem;
        padding-right: 0.5rem;
    }
    
    .container,
    .container-fluid {
        padding-left: 1rem;
        padding-right: 1rem;
    }
}

/* ===== TEXT OVERFLOW HANDLING ===== */
.text-truncate-mobile {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

@media (max-width: 767px) {
    .text-truncate-mobile {
        max-width: 150px;
    }
}

@media (max-width: 575px) {
    .text-truncate-mobile {
        max-width: 100px;
    }
}

/* ===== FLOATING ACTION BUTTON RESPONSIVE ===== */
@media (max-width: 767px) {
    .floating-action-btn {
        bottom: 70px; /* Account for mobile browser UI */
        right: 15px;
        width: 48px;
        height: 48px;
    }
    
    .floating-action-group {
        bottom: 130px;
        right: 15px;
    }
}

/* ===== MODAL RESPONSIVE ===== */
@media (max-width: 575px) {
    .modal-dialog {
        margin: 0;
        max-width: 100%;
        height: 100%;
    }
    
    .modal-content {
        height: 100%;
        border-radius: 0;
    }
    
    .modal-header,
    .modal-footer {
        border-radius: 0;
    }
}

/* ===== RESPONSIVE UTILITIES ===== */
/* Hide scrollbar but keep functionality */
.hide-scrollbar {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

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

/* Responsive spacing utilities */
@media (max-width: 575px) {
    .p-sm-2 { padding: 0.5rem !important; }
    .p-sm-3 { padding: 1rem !important; }
    .m-sm-2 { margin: 0.5rem !important; }
    .m-sm-3 { margin: 1rem !important; }
}

/* ===== LANDSCAPE ORIENTATION FIXES ===== */
@media (max-height: 500px) and (orientation: landscape) {
    .navbar {
        padding: 0.25rem 0;
    }
    
    /* Logo height already defined in navbar-simple.css */
    
    .navbar-nav .nav-link {
        padding: 0.25rem 0.5rem;
    }
}

/* ===== PRINT STYLES ===== */
@media print {
    .navbar,
    .floating-action-btn,
    .floating-action-group,
    .btn-favorite,
    .share-buttons,
    .adsense-zone {
        display: none !important;
    }
    
    .container {
        max-width: 100% !important;
    }
    
    .table-responsive {
        overflow: visible !important;
    }
}