/* =========================================================================================
 *   Sub Custom common
 * =========================================================================================*/

body {

}


/* footer 위치조정용 */
main {
    min-height: calc(100vh - 276px );
}

/* 배경 parttern */
.background-parttern {
    background-color: #fafafa;
    background-image:
            linear-gradient(to right, rgba(0,0,0,0.03) 1px, transparent 1px),
            linear-gradient(to bottom, rgba(0,0,0,0.03) 1px, transparent 1px);
    background-size: 24px 24px;
}

/* 댓글 */
.comments-section {
    margin-top: 40px;
    font-family: 'pretendard', sans-serif;
}
.comments-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}
.comments-count {
    color: #971132;
}
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.comment-item {
    display: flex;
    gap: 15px;
    padding: 20px 10px;
    border-bottom: 1px solid #f1f1f1;
}
.comment-item:last-child {
    border-bottom: none;
}
.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #555;
    flex-shrink: 0;
}
.comment-body {
    flex-grow: 1;
}
.comment-author-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.comment-author {
    font-weight: 600;
}
.comment-date {
    font-size: 0.85em;
    color: #888;
}
.comment-content {
    color: #444;
    line-height: 1.6;
}
.no-comments {
    text-align: center;
    padding: 40px;
    color: #888;
}
.comment-form-container {
    margin-top: 30px;
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}
.comment-form textarea {
    width: 100%;
    min-height: 80px;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px;
    resize: vertical;
    transition: border-color 0.2s;
}
.comment-form textarea:focus {
    outline: none;
    border-color: #971132;
}
.comment-form .form-actions {
    margin-top: 10px;
    text-align: right;
}
.comment-form .btn-submit {
    background-color: #971132;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}
.comment-form .btn-submit:hover {
    background-color: #7a0e28;
}
.login-prompt {
    text-align: center;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    margin-top: 30px;
}.comments-section {
     margin-top: 40px;
     font-family: 'pretendard', sans-serif;
 }
.comments-header {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1.2em;
    font-weight: 600;
    color: #333;
    margin-bottom: 20px;
    border-bottom: 2px solid #eee;
    padding-bottom: 10px;
}
.comments-count {
    color: #971132;
}
.comment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.comment-item {
    display: flex;
    gap: 15px;
    padding: 20px 10px;
    border-bottom: 1px solid #f1f1f1;
}
.comment-item:last-child {
    border-bottom: none;
}
.comment-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #f0f0f0;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    color: #555;
    flex-shrink: 0;
}
.comment-body {
    flex-grow: 1;
}
.comment-author-info {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}
.comment-author {
    font-weight: 600;
}
.comment-date {
    font-size: 0.85em;
    color: #888;
}
.comment-content {
    color: #444;
    line-height: 1.6;
}
.no-comments {
    text-align: center;
    padding: 40px;
    color: #888;
}
.comment-form-container {
    margin-top: 30px;
    background-color: #f9f9f9;
    padding: 20px;
    border-radius: 8px;
}
.comment-form textarea {
    width: 100%;
    min-height: 80px;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 10px;
    resize: vertical;
    transition: border-color 0.2s;
}
.comment-form textarea:focus {
    outline: none;
    border-color: #971132;
}
.comment-form .form-actions {
    margin-top: 10px;
    text-align: right;
}
.comment-form .btn-submit {
    background-color: #971132;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    transition: background-color 0.2s;
}
.comment-form .btn-submit:hover {
    background-color: #7a0e28;
}
.login-prompt {
    text-align: center;
    padding: 20px;
    background-color: #f9f9f9;
    border-radius: 8px;
    margin-top: 30px;
}

/* 첨부파일 */

/* Styles for attachment section, copied from attachementList.jsp */
.attachment-section {
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    margin-top: 20px;
    overflow: hidden;
    padding: 20px; /* Added padding for the whole section */
}
.attachment-header {
    background-color: #f8f9fa;
    padding: 12px 20px;
    font-weight: bold;
    color: #333;
    border-bottom: 1px solid #e0e0e0;
    margin: -20px -20px 20px -20px; /* Adjust margin to fit padding */
}
.attachment-list {
    list-style: none;
    padding: 0;
    margin: 0;
}
.attachment-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 15px 0; /* Adjusted padding */
    border-bottom: 1px solid #f1f1f1;
    transition: background-color 0.2s ease-in-out;
}
.attachment-item:last-child {
    border-bottom: none;
}
.attachment-item:hover {
    background-color: #f9f9f9;
}
.attachment-info {
    display: flex;
    align-items: center;
    gap: 15px;
}
.attachment-icon {
    font-size: 20px;
    color: #888;
}
.file-details {
    display: flex;
    flex-direction: column;
}
.file-name {
    font-weight: 500;
    color: #333;
    text-decoration: none;
}
.file-name:hover {
    text-decoration: underline;
}
.file-size {
    font-size: 0.85em;
    color: #777;
}
.download-link { /* Not directly used for delete, but for consistency */
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: 6px;
    background-color: #f0f0f0;
    color: #333;
    text-decoration: none;
    font-size: 0.9em;
    font-weight: 500;
    transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out;
}
.download-link:hover {
    background-color: #971132;
    color: #fff;
}
.download-icon {
    font-size: 1.1em;
}

/* 로그인 */
.login-page {
    background-color: #f8f9fa;
    /*min-height: calc(100vh - 178px );*/
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 0;
    font-family: 'pretendard', sans-serif;
}


.login-container {
    width: 100%;
    max-width: 420px;
    padding: 40px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}
.login-header {
    text-align: center;
    margin-bottom: 30px;
}
.login-header .h2 {
    font-size: 1.8em;
    font-weight: 600;
    color: #333;
}
.form-row {
    margin-bottom: 20px;
}
.form-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #444;
}
.form-row .form-control {
    width: 100%;
    height: 48px;
    padding: 0 15px;
    border: 1px solid #ccc;
    border-radius: 6px;
    transition: border-color 0.2s;
}
.form-row .form-control:focus {
    outline: none;
    border-color: #971132;
}
.error-message {
    background-color: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
    padding: 12px 15px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
    font-size: 0.9em;
}
.btn-submit {
    width: 100%;
    padding: 15px;
    border-radius: 6px;
    background-color: #971132;
    color: #fff;
    border: none;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
}
.btn-submit:hover {
    background-color: #7a0e28;
}
.signup-link {
    text-align: center;
    margin-top: 20px;
    font-size: 0.9em;
}
.signup-link a {
    color: #971132;
    text-decoration: none;
    font-weight: 500;
}
.signup-link a:hover {
    text-decoration: underline;
}

/* 게시판 - 목록 */
/* 게시판 - 상세보기 */
.contents-inner{
    width: 100%;
}
.contents-body{
    min-height: 380px;
}
.view-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}

.view-actions .left-actions {
    display: flex;
    gap: 10px;
}

.view-actions .right-actions {
    display: flex;
    gap: 10px;
}

.view-actions .btn-action {
    display: inline-block;
    padding: 10px 20px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    border: 1px solid transparent;
    font-size: 0.95em;
}

.view-actions .btn-list {
    background-color: #fff;
    color: #333;
    border-color: #ccc;
}
.view-actions .btn-list:hover {
    background-color: #f8f8f8;
    border-color: #bbb;
}

.view-actions .btn-edit {
    background-color: #555;
    color: #fff;
}
.view-actions .btn-edit:hover {
    background-color: #333;
}

.view-actions .btn-delete {
    background-color: #e74c3c;
    color: #fff;
    cursor: pointer;
}
.view-actions .btn-delete:hover {
    background-color: #c0392b;
}

/* 게시판 - 추가/수정 */
.form-section {
    max-width: 1200px;
    margin: 40px auto;
    padding: 40px;
    background-color: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    font-family: 'pretendard', sans-serif;
}
.form-header {
    font-size: 1.5em;
    font-weight: 600;
    color: #333;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 2px solid #333;
}
.form-row {
    margin-bottom: 25px;
}
.form-row label {
    display: block;
    font-weight: 600;
    margin-bottom: 8px;
    color: #444;
}
.form-row .form-control {
    width: 100%;
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 6px;
    transition: border-color 0.2s;
}
.form-row .form-control:focus {
    outline: none;
    border-color: #971132;
}
.form-row .form-control-file {
    padding: 10px;
    border: 1px solid #ccc;
    border-radius: 6px;
}
.form-row .form-check-label {
    margin-left: 5px;
}
.existing-attachments {
    margin-top: 15px;
}
.existing-attachments .list-group-item {
    background-color: #f9f9f9;
    border-radius: 6px;
    margin-bottom: 8px;
}
.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 40px;
    padding-top: 20px;
    border-top: 1px solid #eee;
}
.form-actions .btn-action {
    display: inline-block;
    padding: 12px 25px;
    border-radius: 6px;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease-in-out;
    border: 1px solid transparent;
    cursor: pointer;
}
.form-actions .btn-cancel {
    background-color: #fff;
    color: #555;
    border-color: #ccc;
}

.form-actions .btn-list {
    background-color: #fff;
    color: #555;
    border-color: #ccc;
}

.form-actions .btn-cancel:hover {
    background-color: #f8f8f8;
    border-color: #bbb;
}
.form-actions .btn-submit {
    background-color: #971132;
    color: #fff;
}
.form-actions .btn-submit:hover {
    background-color: #7a0e28;
}

/* 에디터 높이 증가/감소 버튼 */
.editor-height-controls {
    display: flex;
    gap: 10px;
    margin-top: 10px;
    justify-content: center;
}
.editor-height-btn {
    padding: 3px 9px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f0f0f0;
    color: #555;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s ease-in-out;
}
.editor-height-btn:hover {
    background-color: #e0e0e0;
    border-color: #bbb;
    color: #333;
    text-align: center;
}

/* 추가/수정 첨부파일 */
.editor-height-controls {
    display: flex;
    gap: 10px;
    margin-top: 10px;
}
.editor-height-btn {
    padding: 8px 15px;
    border: 1px solid #ccc;
    border-radius: 5px;
    background-color: #f0f0f0;
    color: #555;
    cursor: pointer;
    font-size: 0.9em;
    transition: all 0.2s ease-in-out;
}
.editor-height-btn:hover {
    background-color: #e0e0e0;
    border-color: #bbb;
    color: #333;
}


/* Spacing for existing attachments section */
.existing-attachments-container {
    margin-top: 1.6rem; /* Consistent with project's spacing */
    padding-top: 1.6rem;
}



/* Style for dynamically created delete button in new file preview */
.attachment-delete-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 6rem;
    height: var(--ht-sm);
    padding: 0 1.2rem;
    font-size: var(--fs-p3);
    font-weight: var(--fw-medium);
    color: var(--white);
    background-color: var(--danger);
    border: 1px solid transparent;
    border-radius: 0.4rem;
    cursor: pointer;
    transition: background-color 0.3s ease;
    margin-left: 1rem;
}

.attachment-delete-btn:hover {
    background-color: rgba(var(--danger-rgb), 0.8);
}

/* 체크 박스 */
.form-check{
    display: flex;
}
.form-check-input {
    width: 25px !important;
    height: 25px !important;
    margin-right: 5px;
}
.form-check-input.btn-del{
    accent-color: red;
}

.form-row.cols-2 {
    display: flex;
    flex-wrap: wrap;
    margin-right: -10px;
    margin-left: -10px;
}

@media (min-width: 768px) {
    .form-row.cols-2 > .form-group {
        padding-right: 10px;
        padding-left: 10px;
        flex: 0 0 50%;
        max-width: 50%;
    }
}

/* btn-submit width처리*/
.btn-submit.width-88{
    width: 88%;
}


@media (max-width: 768px) {
    .btn-submit{
        padding: 10px;
    }
    .btn-submit.width-88{
        width: 50%;
    }
    .btn-submit.width-55{
        width: 55%;
    }
}


.btn-action i,
label i
{
    margin-right: 8px;
    width: 1.2em;
    text-align: center;
}

.list-footer {
    display: flex;
    margin-top: 20px;
}