/**
 * 메뉴 모달 다이얼로그 스타일
 *
 * 이 파일은 widgets/dialog/menu.php 에서 사용됩니다.
 *
 * 구조:
 * - 모달 콘텐츠 배경 및 헤더
 * - 운영자 전용 메뉴 섹션
 * - 메인 액션 카드 (컴팩트 디자인)
 * - 섹션 스타일
 * - 카테고리 카드 (1차/2차)
 * - 서비스 카드
 * - 반응형 미디어 쿼리
 */

/* ===== 메뉴 모달 - 심플하고 깔끔한 디자인 ===== */

/* 모달 콘텐츠 배경 */
.menu-modal-content {
    background: #fff;
}

/* 모달 헤더 - 심플한 스타일 */
.menu-modal-header {
    background: #fff;
    padding: 1rem 1.25rem;
}

/* 모달 본문 */
.menu-modal-body {
    overflow-y: auto;
    background: #f8f9fa;
}

/* ===== 운영자 전용 메뉴 ===== */
.menu-admin-section {
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e9ecef;
}

.menu-admin-item {
    background: #1a1a2e !important;
    color: #fff !important;
    text-decoration: none;
}

.menu-admin-item:hover {
    background: #2d2d44 !important;
    color: #fff !important;
}

.menu-admin-item i {
    font-size: 1rem;
}

/* ===== 메인 액션 카드 (컴팩트 디자인) ===== */
.menu-action-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* 컴팩트 액션 카드 */
.menu-action-card-compact {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: #fff;
    border-radius: 8px;
    padding: 0.5rem 0.875rem;
    cursor: pointer;
    transition: background 0.15s ease;
    border: 1px solid #e9ecef;
    text-decoration: none;
    color: inherit;
}

.menu-action-card-compact:hover {
    background: #f8f9fa;
    text-decoration: none;
    color: inherit;
}

/* 컴팩트 아이콘 */
.menu-action-icon-compact {
    width: 28px;
    height: 28px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
    color: #fff;
    flex-shrink: 0;
}

/* 보라색 배경 (운영자 채팅용) */
.menu-action-icon-compact.bg-purple {
    background: #6c5ce7;
}

/* 액션 라벨 */
.menu-action-label {
    font-size: 0.8125rem;
    font-weight: 500;
    color: #212529;
    white-space: nowrap;
}

/* ===== 섹션 스타일 ===== */
.menu-section {
    background: #fff;
    border-radius: 12px;
    border: 1px solid #e9ecef;
    overflow: hidden;
}

.menu-section-header {
    background: #fff;
    padding: 0.875rem 1rem;
    font-weight: 600;
    font-size: 0.875rem;
    color: #495057;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #e9ecef;
}

.menu-section-body {
    padding: 1rem;
}

/* ===== 카테고리 카드 (2차 카테고리 있는 경우) ===== */
.menu-category-card {
    background: #fff;
    border-radius: 8px;
    overflow: hidden;
    border: 1px solid #e9ecef;
}

.menu-category-header {
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    background: #fff;
    color: #212529;
    text-decoration: none;
    font-weight: 600;
    font-size: 0.875rem;
    transition: background 0.15s ease;
}

.menu-category-header:hover {
    background: #f8f9fa;
    color: #0d6efd;
}

.menu-category-children {
    padding: 0.5rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.375rem;
    background: #f8f9fa;
}

.menu-category-child {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.625rem;
    background: #fff;
    border-radius: 4px;
    font-size: 0.75rem;
    color: #495057;
    text-decoration: none;
    transition: background 0.15s ease;
    border: 1px solid #e9ecef;
}

.menu-category-child:hover {
    background: #e9ecef;
    color: #212529;
}

/* 전체보기 링크 강조 스타일 */
.menu-category-view-all {
    font-weight: 600;
    background: #212529 !important;
    color: #fff !important;
    border-color: #212529 !important;
}

.menu-category-view-all:hover {
    background: #343a40 !important;
    color: #fff !important;
}

/* ===== 단일 카테고리 ===== */
.menu-category-single {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem;
    background: #fff;
    border-radius: 8px;
    color: #495057;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.8125rem;
    transition: background 0.15s ease;
    border: 1px solid #e9ecef;
}

.menu-category-single:hover {
    background: #f8f9fa;
    color: #212529;
}

/* ===== 서비스 카드 ===== */
.menu-service-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 1rem 0.75rem;
    background: #fff;
    border-radius: 8px;
    color: #495057;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.75rem;
    transition: background 0.15s ease;
    border: 1px solid #e9ecef;
    gap: 0.375rem;
}

.menu-service-card i {
    font-size: 1.25rem;
}

.menu-service-card:hover {
    background: #f8f9fa;
}

/* 서비스 카드 색상 변형 - 심플한 단색 */
.menu-service-warning {
    color: #b45309;
}
.menu-service-warning i {
    color: #f59e0b;
}

.menu-service-info {
    color: #0369a1;
}
.menu-service-info i {
    color: #0ea5e9;
}

.menu-service-success {
    color: #047857;
}
.menu-service-success i {
    color: #10b981;
}

.menu-service-secondary {
    color: #4b5563;
}
.menu-service-secondary i {
    color: #6b7280;
}

.menu-service-primary {
    color: #1d4ed8;
}
.menu-service-primary i {
    color: #3b82f6;
}

.menu-service-danger {
    color: #b91c1c;
}
.menu-service-danger i {
    color: #ef4444;
}

/* ===== 데스크톱 모드 (768px 이상) ===== */
@media (min-width: 768px) {
    .menu-modal-content {
        border-radius: 12px;
        box-shadow: 0 4px 24px rgba(0, 0, 0, 0.15);
        overflow: hidden;
    }
}

/* ===== 반응형 조정 (모바일 576px 이하) ===== */
@media (max-width: 576px) {
    .menu-action-grid {
        gap: 0.375rem;
    }

    .menu-action-card-compact {
        padding: 0.375rem 0.625rem;
        font-size: 0.75rem;
    }

    .menu-action-icon-compact {
        width: 24px;
        height: 24px;
        font-size: 0.75rem;
    }

    .menu-action-label {
        font-size: 0.75rem;
    }

    .menu-section-header {
        font-size: 0.8125rem;
        padding: 0.75rem 1rem;
    }

    .menu-category-header {
        font-size: 0.8125rem;
        padding: 0.625rem 0.75rem;
    }

    .menu-category-child {
        font-size: 0.6875rem;
        padding: 0.1875rem 0.5rem;
    }

    .menu-service-card {
        padding: 0.75rem 0.5rem;
        font-size: 0.6875rem;
    }

    .menu-service-card i {
        font-size: 1rem;
    }
}
