/* ===================================
   Common Responsive Patterns
   모든 탭에서 공통으로 사용하는 반응형 패턴
   =================================== */

/* Sidebar Toggle Button (Common Pattern) */
.sidebar-toggle-btn-common {
    display: none;
    position: absolute;
    top: 12px;
    left: 12px;
    z-index: 10;
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    border-radius: 6px;
    padding: 6px 10px;
    cursor: pointer;
    color: var(--text-primary);
    font-size: 16px;
    transition: all 0.2s ease;
    align-items: center;
    gap: 6px;
}

.sidebar-toggle-btn-common:hover {
    background: var(--glass-panel-hover);
}

.sidebar-overlay-common {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.sidebar-overlay-common.active {
    display: block;
    opacity: 1;
}

/* Generic Two-Column Layout */
.two-column-layout {
    display: flex;
    gap: 24px;
    height: 100%;
}

.two-column-sidebar {
    min-width: 250px;
    max-width: 350px;
}

.two-column-main {
    flex: 1;
    min-width: 0;
}

/* Tablet/Small Desktop (1200px and below) */
@media screen and (max-width: 1200px) {
    .sidebar-toggle-btn-common {
        display: flex;
    }

    .two-column-sidebar {
        position: fixed;
        left: -350px;
        top: 0;
        bottom: 0;
        width: 320px;
        z-index: 999;
        background: var(--sidebar-bg);
        transition: left 0.3s ease;
        box-shadow: 2px 0 10px rgba(0, 0, 0, 0.2);
        padding: 20px;
        overflow-y: auto;
    }

    .two-column-sidebar.active {
        left: 0;
    }

    .two-column-main {
        width: 100%;
        padding-top: 50px;
    }
}

/* Mobile/Small Tablet (700px and below) */
@media screen and (max-width: 700px) {
    .two-column-layout {
        gap: 0;
    }

    .two-column-sidebar {
        width: 280px;
        left: -280px;
        padding: 16px;
    }

    .two-column-main {
        padding: 50px 12px 12px;
    }

    /* Compact buttons */
    button, .btn {
        padding: 6px 10px;
        font-size: 13px;
    }

    /* Smaller cards */
    .card {
        padding: 12px;
    }

    /* Stack form actions */
    .form-actions, .modal-actions {
        flex-direction: column;
        gap: 8px;
    }

    .form-actions button, .modal-actions button {
        width: 100%;
    }
}

/* Mobile (400px and below) */
@media screen and (max-width: 400px) {
    .two-column-sidebar {
        width: 100%;
        left: -100%;
    }

    .two-column-sidebar.active {
        left: 0;
    }

    .sidebar-toggle-btn-common {
        top: 8px;
        left: 8px;
        padding: 4px 8px;
        font-size: 14px;
    }

    .two-column-main {
        padding: 45px 8px 8px;
    }

    /* Very compact spacing */
    h1, h2, h3 {
        font-size: 1.1em;
    }

    /* Stack everything */
    .flex-row {
        flex-direction: column;
        gap: 8px;
    }

    /* Full width inputs */
    input, textarea, select {
        width: 100%;
    }
}
