/* ========================================
   RESPONSIVE DESIGN - Tablet & Desktop
   ======================================== */

/* Touch-friendly minimum sizes */
:root {
    --touch-target-min: 44px;
}

/* ========================================
   SIDEBAR OVERLAY - All Screen Sizes
   ======================================== */
.mobile-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 150;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease;
    -webkit-backdrop-filter: blur(2px);
    backdrop-filter: blur(2px);
}

.mobile-overlay.show {
    opacity: 1;
    visibility: visible;
}

/* Main panel takes full width since sidebar is now overlay */
.main-panel {
    width: 100%;
    flex: 1;
}

/* ========================================
   TABLET STYLES (769px - 1024px)
   ======================================== */
@media (max-width: 1024px) and (min-width: 769px) {
    .details-panel:not(.hidden) {
        flex-basis: clamp(320px, 35vw, 420px);
        min-width: clamp(320px, 35vw, 420px);
    }

    .topology-header {
        padding: var(--spacing-md) var(--spacing-lg);
    }

    .cto-cards-container {
        padding: var(--spacing-md);
    }
}

/* ========================================
   HIGH DPI / RETINA DISPLAYS
   ======================================== */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    /* Sharper borders */
    .cto-card,
    .client-table,
    .details-panel {
        border-width: 0.5px;
    }
}

/* ========================================
   REDUCED MOTION
   ======================================== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .sidebar,
    .details-panel {
        transition: none;
    }
}

/* ========================================
   PRINT STYLES
   ======================================== */
@media print {
    .header,
    .footer,
    .sidebar,
    .panel-resizer,
    .mobile-overlay,
    .topology-actions,
    .details-actions {
        display: none !important;
    }

    .main-panel,
    .details-panel {
        width: 100% !important;
        max-width: 100% !important;
        position: static !important;
        transform: none !important;
    }

    .cto-card {
        break-inside: avoid;
        page-break-inside: avoid;
    }
}
