@charset "utf-8";

/* Webclap 게시판 스타일 */
.webclap-container {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    height: 60vh; /* 전체 화면 높이 사용 */
    min-height: 400px; /* 최소 높이 설정 */
}

/* 상단 이미지 영역 */
.image_webclap {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    flex: 1; /* 1:3 비율 중 1 */
    height: 40vh;
    max-height: 400px;
}

.image_webclap .btn_image_admin {
    position: absolute;
    top: 0;
    right: 0;
    z-index: 10;
    width: 40px;
    height: 40px;
    padding: 5px;
    border: 1px solid var(--border-color);
    border-radius: 4px;
    background-color: var(--btn-secondary-bg);
    color: var(--btn-secondary-text);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    box-sizing: border-box;
    text-decoration: none;
}

.image_webclap .btn_image_admin:hover,
.image_webclap .btn_image_admin:focus {
    background-color: var(--primary-color);
    color: #fff;
}

.image_webclap .btn_image_admin::after {
    content: '이미지 관리';
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 5px;
    padding: 6px 10px;
    background-color: var(--btn-secondary-bg);
    color: var(--btn-secondary-text);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
}

.image_webclap .btn_image_admin:hover::after {
    opacity: 1;
}

.image_webclap .image-container {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
}
    
.image_webclap .image-container img {
    max-width: 800px;
    max-height: 250px;
    width: auto;
    height: auto;
    object-fit: contain;
}

.image_webclap .image-container .image-with-tooltip {
    position: relative;
    display: inline-block;
}

.image_webclap .image-container .image-with-tooltip .random-image {
    cursor: help;
}

.image_webclap .image-container .image-tooltip {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    margin-bottom: 10px;
    padding: 10px 15px;
    background-color: var(--container-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
    z-index: 1000;
    font-size: 0.9em;
    color: var(--text-primary);
    max-width: 300px;
    white-space: normal;
    word-wrap: break-word;
    text-align: center;
    line-height: 1.6;
}

.image_webclap .image-container .image-with-tooltip:hover .image-tooltip {
    opacity: 1;
}

/* 하단 글쓰기 영역 */
.write_webclap {
    width: 100%;
    display: flex;
    flex-direction: column;
    gap: 20px;
    flex: 3; /* 1:3 비율 중 3 */
}

/* 공지글 영역 */
.notice_write_webclap {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
}

.notice_write_webclap .notice-item-wrapper {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    justify-content: center;
}

.notice_write_webclap .notice-item {
    width: 50%;
    max-width: 600px;
    background-color: var(--container-bg-color);
    min-height: 60px;
    max-height: 120px;
    padding: 15px;
    border-radius: 4px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow-y: auto;
    height: auto;
}

.notice_write_webclap .notice-content {
    text-align: center;
    line-height: 1.6;
    color: var(--text-primary);
    word-wrap: break-word;
    width: 90%;
    overflow-y: auto;
}

/* 일반 글쓰기 영역 */
.guestbook_write_webclap {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 10px;
}

.guestbook_write_webclap .write-form-wrapper {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
    align-items: center;
}

.guestbook_write_webclap .write-fields {
    width: 80%;
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 4px;
}

.guestbook_write_webclap .guest-info {
    display: flex;
    gap: 10px;
    margin-bottom: 4px;
    width: 50%;
    justify-content: space-between;
}

.guestbook_write_webclap .guest-info .frm_input {
    flex: 1;
    min-width: 0;
    width: 100%;
}

.guestbook_write_webclap .write-input-wrapper {
    display: flex;
    align-items: stretch;
    gap: 10px;
    width: 100%;
    max-width: 100%;
    justify-content: flex-start;
}

.guestbook_write_webclap .write-options {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 8px;
}

.guestbook_write_webclap .secret-checkbox,
.guestbook_write_webclap .notice-checkbox {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 0.9em;
    color: var(--text-primary);
}

.guestbook_write_webclap .secret-checkbox input[type="checkbox"],
.guestbook_write_webclap .notice-checkbox input[type="checkbox"] {
    width: 16px;
    height: 16px;
}

.guestbook_write_webclap textarea {
    background-color: var(--card-bg-color);
    border: 1px solid var(--border-color);
    border-radius: 4px;
    padding: 10px;
    resize: vertical;
    min-height: 80px;
    font-family: var(--content-font-family);
    width: 100%;
    max-width: none;
    flex: 1;
}

.guestbook_write_webclap textarea:focus {
    outline: none;
    border-color: var(--border-color);
}

.guestbook_write_webclap .btn_submit {
    transition: all 0.3s ease;
    align-self: stretch;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 80px;
    box-sizing: border-box;
}

.guestbook_write_webclap .btn_submit:hover {
    opacity: 0.9;
    transform: translateY(-1px);
}

/* 작성된 글 목록 */
.guestbook_list_webclap {
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
    padding-bottom: 20px;
}

/* 일반 글 스타일 */
.guestbook_list_webclap .guestbook-item {
    width: 80%;
    max-width: 800px;
    background-color: var(--container-bg-color);
    min-height: 100px;
    padding: 10px;
    border-radius: 8px;
    position: relative;
    padding-right: 90px;
}

.guestbook_list_webclap .guestbook-meta-item {
    width: 100%;
    background-color: var(--container-bg-color);
    padding: 0px 0px 15px 0px;
    border-radius: 4px 4px 0 0;

}

.guestbook_list_webclap .guestbook-content-item {
    width: 100%;
    background-color: var(--container-bg-color);
    padding: 0 15px 0px 0px;
}

.guestbook_list_webclap .guestbook-content {
    word-wrap: break-word;
}

.guestbook_list_webclap .guestbook-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    font-size: 0.9em;
    color: #666;
    padding-top: 10px;
}

.guestbook_list_webclap .guestbook-author {
    display: flex;
    align-items: center;
    gap: 5px;
}

.guestbook_list_webclap .guestbook-secret-placeholder {
    font-weight: 600;
    color: var(--text-muted);
}

.guestbook_list_webclap .guestbook-name {
    font-weight: 600;
    color: var(--text-primary);
    cursor: default;
    pointer-events: none;
    text-decoration: none;
}

.guestbook_list_webclap .guestbook-date {
    margin-left: 5px;
    font-size: 0.85em;
    color: var(--text-muted);
}

.guestbook_list_webclap .guestbook-name a {
    color: var(--text-primary);
    text-decoration: none;
    cursor: default;
    pointer-events: none;
}

.guestbook_list_webclap .guestbook-name a:hover,
.guestbook_list_webclap .guestbook-name a:focus,
.guestbook_list_webclap .guestbook-name a:active {
    color: var(--text-primary);
    text-decoration: none;
    cursor: default;
}

.guestbook_list_webclap .guestbook-delete-btn {
    position: absolute;
    top: 10px;
    right: 10px;
    border: none;
    background: var(--btn-secondary-bg);
    color: var(--btn-secondary-text);
    padding: 4px 8px;
    border-radius: var(--btn-primary-radius);
    font-size: 10px;
    font-weight: var(--font-weight-bold);
    cursor: pointer;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.guestbook_list_webclap .guestbook-delete-btn:hover,
.guestbook_list_webclap .guestbook-delete-btn:focus {
    transform: translateY(-1px);
    box-shadow: 0 6px 14px rgba(0, 0, 0, 0.2);
    opacity: 0.9;
}

.guestbook_list_webclap .empty-list {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-size: 0.95em;
}

/* 반응형 디자인 */
@media (max-width: 768px) {
    .guestbook_write_webclap .write-fields {
        width: 80%;
    }

    .guestbook_write_webclap .guest-info {
        flex-direction: column;
        width: 100%;
    }

    .guestbook_write_webclap .write-input-wrapper {
        flex-direction: column;
        width: 100%;
    }
    
    .guestbook_write_webclap textarea {
        width: 100% !important;
    }
    
    .guestbook_write_webclap .btn_submit {
        width: 100%;
        margin-left: 0 !important;
    }
    
    .notice_write_webclap .notice-item {
        width: 80%;
        max-width: 800px;
    }
    
    .guestbook_list_webclap .guestbook-item {
        width: 90%;
        max-width: none;
    }
    
    .guestbook_list_webclap .guestbook-meta-item,
    .guestbook_list_webclap .guestbook-content-item {
        width: 100%;
    }
}

