/* 
 * Mosaic Information 메인 스타일시트
 */

/* 공통 스타일 */
:root {
    --primary-color: #4e73df;
    --secondary-color: #6c757d;
    --success-color: #1cc88a;
    --danger-color: #e74a3b;
    --warning-color: #f6c23e;
    --info-color: #36b9cc;
    --dark-color: #5a5c69;
    --light-color: #f8f9fc;
}

body {
    font-family: 'Nunito', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background-color: #f8f9fc;
}

/* 네비게이션 바 스타일 */
.navbar-brand {
    font-weight: 700;
    font-size: 1.2rem;
}

/* 카드 스타일 */
.card {
    border: none;
    border-radius: 0.5rem;
    box-shadow: 0 0.15rem 1.75rem 0 rgba(58, 59, 69, 0.15);
    margin-bottom: 1.5rem;
}

.card-header {
    border-bottom: 1px solid #e3e6f0;
    padding: 0.75rem 1.25rem;
}

/* 버튼 스타일 */
.btn {
    border-radius: 0.25rem;
    padding: 0.375rem 0.75rem;
    font-weight: 400;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background-color: #2e59d9;
    border-color: #2653d4;
}

/* 폼 스타일 */
.form-control, .form-select {
    border-radius: 0.25rem;
    font-size: 0.9rem;
    padding: 0.375rem 0.75rem;
}

.form-control:focus, .form-select:focus {
    box-shadow: 0 0 0 0.25rem rgba(78, 115, 223, 0.25);
    border-color: #bac8f3;
}

/* 테이블 스타일 */
.table {
    color: #5a5c69;
}

.table thead th {
    font-weight: 700;
    border-top: none;
}

/* 무료 회원용 광고 영역 */
.ad-container {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    border-top: 1px solid #e3e6f0;
    padding: 0.5rem 0;
    z-index: 1030;
    text-align: center;
}

.ad-content {
    padding: 0.5rem;
    font-size: 0.9rem;
    color: #5a5c69;
}

/* 콘텐츠 뷰 스타일 */
.content-container {
    max-height: 800px;
    overflow-y: auto;
    padding: 1rem;
    border: 1px solid #e3e6f0;
    border-radius: 0.25rem;
}

.content-iframe-container {
    min-height: 600px;
}

/* 프리미엄 배지 */
.badge-premium {
    background-color: #f6c23e;
    color: #5a5c69;
}

/* 반응형 대시보드 카드 */
@media (max-width: 768px) {
    .dashboard-card {
        margin-bottom: 1rem;
    }
}

/* 공유 링크 입력 필드 */
.share-url {
    font-size: 0.85rem;
    background-color: #f8f9fc;
}

/* 프로필 배지 */
.badge-admin {
    background-color: #e74a3b;
    color: #fff;
}

.badge-premium {
    background-color: #f6c23e;
    color: #5a5c69;
}

/* 대시보드 카드 스타일 */
.category-card {
    transition: transform 0.2s;
}

.category-card:hover {
    transform: translateY(-5px);
}

.list-group-item-action:hover {
    background-color: rgba(78, 115, 223, 0.05);
}

/* 콘텐츠 타입 아이콘 색상 */
.icon-image {
    color: #1cc88a;
}

.icon-pdf {
    color: #e74a3b;
}

.icon-markdown {
    color: #36b9cc;
}

.icon-html {
    color: #f6c23e;
}

.icon-excel {
    color: #1cc88a;
}

.icon-ppt {
    color: #e74a3b;
}

.icon-word {
    color: #4e73df;
}

.icon-link {
    color: #4e73df;
}

/* 로딩 스피너 */
.spinner-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.7);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 2000;
}

.spinner-container {
    text-align: center;
}

.spinner-border {
    width: 3rem;
    height: 3rem;
}

/* PDF 뷰어 스타일 */
.pdf-preview {
    white-space: pre-wrap;
    font-family: monospace;
    background-color: #f8f9fc;
    padding: 1rem;
    border-radius: 0.25rem;
    max-height: 500px;
    overflow-y: auto;
}

/* 오피스 문서 미리보기 스타일 */
.excel-preview, .word-preview, .ppt-preview {
    padding: 1rem;
    background-color: #f8f9fc;
    border-radius: 0.25rem;
    text-align: center;
}

/* 에러 메시지 스타일 */
.error {
    color: #e74a3b;
    padding: 1rem;
    background-color: #f8d7da;
    border-radius: 0.25rem;
}

/* 국적 플래그 아이콘 */
.flag-icon {
    margin-right: 0.5rem;
    font-size: 1.2rem;
}

/* 모바일 용 추가 스타일 */
.btn-mobile {
    padding: 0.5rem 0.75rem;
    font-size: 0.9rem;
}

/* 모바일 화면에서 콘텐츠 헤더 영역 */
.content-header {
    margin-bottom: 1.5rem;
}

.content-title {
    word-break: break-word;
    font-size: 1.5rem;
    line-height: 1.3;
}

.content-meta {
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* PDF 컨테이너 */
.pdf-container {
    width: 100%;
}

.pdf-controls {
    margin-top: 0.75rem;
}

/* 공유 링크 카드 */
.share-card {
    transition: all 0.2s ease;
    border-radius: 0.5rem;
}

.share-card:hover {
    box-shadow: 0 0.15rem 0.5rem rgba(0, 0, 0, 0.1);
}

.share-url-container {
    width: 100%;
}

/* 모바일 비율 클래스 */
@media (min-width: 768px) {
    .ratio-md-16x9 {
        --bs-aspect-ratio: 56.25%;
    }
}

/* 모달 스타일 개선 */
.modal-backdrop {
    opacity: 0.7 !important; /* 배경 어둡게 설정 */
}

.modal-content {
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

.modal-header {
    background-color: #f8f9fc;
}

.delete-share-modal {
    z-index: 1050 !important; /* z-index 강제 설정 */
}

.modal.show {
    display: block !important; /* 모달 표시 강제 */
}

/* 모바일 전용 추가 반응형 사이즈 조정 */
@media (max-width: 576px) {
    /* 추가 모바일 스타일 */
    .content-title {
        font-size: 1.3rem;
    }
    
    .content-meta {
        font-size: 0.85rem;
    }
    
    .content-actions {
        width: 100%;
        margin-top: 0.5rem;
    }
    
    .pdf-container {
        overflow: hidden;
    }
    
    .pdf-controls {
        flex-wrap: wrap;
        justify-content: center;
    }
    
    /* 공유 카드 스타일 */
    .share-card {
        padding: 0.75rem !important;
    }
    
    /* 모바일 기기에서 모달 스타일 강화 */
    .modal-dialog {
        margin: 0.5rem auto;
        max-width: 95%;
    }
    
    .modal-content {
        border-radius: 0.5rem;
    }
    
    .modal-footer {
        flex-wrap: nowrap;
    }
}
