/*
 * 파일명: style.css
 * 위치: /assets/css/style.css
 * 기능: Partner Notice Generator 메인 스타일시트
 * 작성일: 2025-07-15
 */

/* ===================================
 * 전역 설정
 * ===================================
 */

/* 기본 폰트 및 레이아웃 설정 */
body {
    font-family: 'Noto Sans KR', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background-color: #f8f9fa;
    line-height: 1.6;
}

/* 커스텀 스크롤바 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* ===================================
 * 헤더 스타일
 * ===================================
 */

/* 헤더 배경 그라데이션 */
header.bg-primary {
    background: linear-gradient(135deg, #0d6efd 0%, #0a58ca 100%) !important;
    box-shadow: 0 2px 10px rgba(13, 110, 253, 0.3);
}

/* 헤더 제목 애니메이션 */
header h1 {
    font-weight: 500;
    letter-spacing: -0.5px;
}

/* ===================================
 * 카드 및 폼 스타일
 * ===================================
 */

/* 카드 그림자 효과 */
.card {
    border: none;
    border-radius: 12px;
    overflow: hidden;
}

.card.shadow-sm {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08) !important;
}

/* 카드 헤더 스타일 */
.card-header {
    border-bottom: 1px solid #e9ecef;
    padding: 1rem 1.5rem;
}

.card-header.bg-light {
    background-color: #f8f9fa !important;
}

/* 카드 바디 패딩 */
.card-body {
    padding: 1.5rem;
}

/* ===================================
 * 폼 컨트롤 스타일
 * ===================================
 */

/* 입력 필드 기본 스타일 */
.form-control, .form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
    transition: all 0.2s ease-in-out;
}

.form-control:focus, .form-select:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* 텍스트 영역 스타일 */
textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* 라벨 스타일 */
.form-label {
    color: #495057;
    margin-bottom: 0.5rem;
    font-size: 0.95rem;
}

.form-label.fw-bold {
    font-weight: 600 !important;
}

/* 체크박스 스타일 */
.form-check-input:checked {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

/* ===================================
 * 버튼 스타일
 * ===================================
 */

/* 기본 버튼 스타일 */
.btn {
    border-radius: 8px;
    font-weight: 500;
    padding: 0.75rem 1.5rem;
    transition: all 0.2s ease-in-out;
}

/* 대형 버튼 */
.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* 소형 버튼 */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

/* 버튼 호버 효과 */
.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(25, 135, 84, 0.3);
}

.btn-warning:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(255, 193, 7, 0.3);
}

/* 비활성화된 버튼 */
.btn:disabled {
    opacity: 0.6;
    transform: none !important;
    box-shadow: none !important;
}

/* ===================================
 * 미리보기 영역 스타일
 * ===================================
 */

/* 미리보기 컨테이너 */
.preview-container {
    background: #ffffff;
    border: 2px dashed #dee2e6;
    border-radius: 12px;
    padding: 2rem;
    min-height: 200px;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
}

/* 미리보기 컨텐츠 */
.preview-content {
    background: #ffffff;
    border: 1px solid #e0e0e0;
    border-radius: 5px;
    padding: 15px 20px;
    max-width: 280px;
    text-align: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    font-family: 'Noto Sans KR', sans-serif;
    font-size: 12px;
    color: #333333;
    line-height: 1.5;
    white-space: pre-line;
    word-break: keep-all;
    margin: 0 auto;
    display: inline-block;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 플레이스홀더 텍스트 */
.preview-placeholder {
    color: #6c757d;
    font-style: italic;
    font-size: 14px;
}

/* ===================================
 * 반응형 설정
 * ===================================
 */

/* 모바일 환경 */
@media (max-width: 767.98px) {
    .container {
        padding-left: 1rem;
        padding-right: 1rem;
    }
    
    .card-body {
        padding: 1rem;
    }
    
    .preview-container {
        padding: 1rem;
        min-height: 150px;
    }
    
    .preview-content {
        padding: 20px 25px;
        font-size: 11px;
    }
    
    header h1 {
        font-size: 1.25rem !important;
    }
}

/* 태블릿 환경 */
@media (min-width: 768px) and (max-width: 991.98px) {
    .preview-content {
        padding: 22px 30px;
    }
}

/* ===================================
 * 유틸리티 클래스
 * ===================================
 */

/* 숨김 클래스 */
.d-none {
    display: none !important;
}

/* 페이드 인 애니메이션 */
.fade-in {
    animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 로딩 애니메이션 */
.loading {
    position: relative;
    overflow: hidden;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.6), transparent);
    animation: loading 1.5s infinite;
}

@keyframes loading {
    0% {
        left: -100%;
    }
    100% {
        left: 100%;
    }
}

/* ===================================
 * 접근성 개선
 * ===================================
 */

/* 포커스 링 개선 */
.btn:focus,
.form-control:focus,
.form-select:focus,
.form-check-input:focus {
    outline: none;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* 고대비 모드 지원 */
@media (prefers-contrast: high) {
    .card {
        border: 2px solid #000;
    }
    
    .preview-content {
        border: 2px solid #000;
    }
}

/* 모션 감소 설정 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ===================================
 * 인쇄 스타일
 * ===================================
 */

@media print {
    header,
    footer {
        display: none;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #000;
    }
    
    .btn {
        display: none;
    }
}


/* ===================================
 * 광고 영역 스타일
 * ===================================
 */
.ad-container {
    width: 100%;
    margin: 0 auto;
}

