/**
 * 공통 모달 스타일
 */

/* 모달 기본 스타일 */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(5px);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 85vh;
    overflow-y: auto;
    position: relative;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
    animation: modalSlideIn 0.3s ease;
}

/* 모달 스크롤바 스타일 */
.modal-content::-webkit-scrollbar {
    width: 8px;
}

.modal-content::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb {
    background: linear-gradient(45deg, #3498db, #2980b9);
    border-radius: 10px;
}

.modal-content::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(45deg, #2980b9, #1f5f8b);
}

/* Firefox 스크롤바 스타일 */
.modal-content {
    scrollbar-width: thin;
    scrollbar-color: #3498db #f1f1f1;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    position: absolute;
    right: 20px;
    top: 20px;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    color: #aaa;
    transition: color 0.3s ease;
}

.close:hover {
    color: #e74c3c;
}

.modal h2 {
    margin-bottom: 25px;
    color: #2c3e50;
    font-weight: 600;
    text-align: center;
}

/* 폼 그룹 스타일 */
.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 1rem;
}

.form-group label .required {
    color: #e74c3c;
    margin-left: 3px;
}

.form-group .form-hint {
    display: block;
    margin-top: 5px;
    font-size: 0.85rem;
    color: #888;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    font-size: 1rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #3498db;
    box-shadow: 0 0 10px rgba(52, 152, 219, 0.2);
}

.form-group input[type='file'] {
    padding: 8px;
    border: 2px dashed #e9ecef;
    background-color: #f8f9fa;
    cursor: pointer;
}

.form-group input[type='file']:hover {
    border-color: #3498db;
    background-color: #e8f4f8;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* 이미지 미리보기 컨테이너 */
.image-preview-container {
    margin-top: 15px;
    padding: 15px;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    background-color: #f8f9fa;
    text-align: center;
}

.image-preview-container img {
    border-radius: 8px;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

/* 문자 수 카운트 */
.char-count {
    display: block;
    text-align: right;
    margin-top: 5px;
    font-size: 0.875rem;
    color: #6c757d;
}

/* 공통 버튼 스타일 */
.submit-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(45deg, #27ae60, #2ecc71);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
}

.submit-btn:hover {
    background: linear-gradient(45deg, #229954, #27ae60);
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(39, 174, 96, 0.3);
}

.submit-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
}

.cancel-btn {
    width: 100%;
    padding: 15px;
    background: #95a5a6;
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.cancel-btn:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(149, 165, 166, 0.3);
}
