/* =========================================================
   Tieng Viet (bo go VietUni) - trang cong cu, khong phai trang noi dung
   nen dung lai dien mao trung tinh cua Truyen (.nentruyen/.nentieude1,
   da co san anh nen trong base.css) thay vi tao 1 bang mau rieng -
   giong dung lua chon cua chinh trang chuviet cu.
   ========================================================= */

.chuviet-intro {
    max-width: 720px;
    margin: 0 auto 18px;
    text-align: center;
    color: #5a4632;
    font-size: 15px;
    line-height: 1.5;
}

.chuviet-theme-switch {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.chuviet-theme-btn {
    padding: 6px 16px;
    border: 1px solid #d8c6a8;
    border-radius: 18px;
    background: #fff;
    color: #4a3b25;
    font-size: 13px;
    font-weight: bold;
    cursor: pointer;
}

    .chuviet-theme-btn.cv-theme-active {
        border-color: #b98a3e;
        background: linear-gradient(135deg, #f7e9cf, #eed3a0);
        color: #6b4a17;
    }

.chuviet-textarea {
    display: block;
    width: 100%;
    min-height: 320px;
    box-sizing: border-box;
    padding: 14px;
    margin-bottom: 14px;
    border: 1px solid #d8c6a8;
    border-radius: 8px;
    background: #fffdf8;
    color: #3a2f1f;
    font-size: 20px;
    line-height: 1.6;
    resize: vertical;
}

.chuviet-textarea:focus {
    outline: none;
    border-color: #b98a3e;
    box-shadow: 0 0 0 3px rgba(185, 138, 62, 0.18);
}

.chuviet-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 12px;
    padding: 10px 14px;
    background: rgba(255, 255, 255, 0.55);
    border: 1px solid #e6d8bd;
    border-radius: 8px;
}

.chuviet-group {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 10px;
}

.chuviet-radio,
.chuviet-checkbox {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
    color: #4a3b25;
    cursor: pointer;
    white-space: nowrap;
}

.chuviet-label {
    font-size: 14px;
    color: #4a3b25;
    font-weight: bold;
    margin-right: 2px;
}

.chuviet-toolbar select {
    padding: 4px 6px;
    border: 1px solid #d8c6a8;
    border-radius: 6px;
    background: #fff;
    font-size: 14px;
    max-width: 160px;
}

.chuviet-btn {
    display: inline-block;
    padding: 7px 16px;
    border: 1px solid #b98a3e;
    border-radius: 18px;
    background: linear-gradient(135deg, #f7e9cf, #eed3a0);
    color: #6b4a17;
    font-weight: bold;
    font-size: 13px;
    cursor: pointer;
    transition: all .15s ease;
}

.chuviet-btn:hover {
    background: linear-gradient(135deg, #eed3a0, #e2bd76);
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(107, 74, 23, 0.25);
}

.chuviet-btn-danger {
    border-color: #b3523f;
    background: linear-gradient(135deg, #f8d9d0, #f0b7a6);
    color: #7a2f1f;
}

.chuviet-btn-danger:hover {
    background: linear-gradient(135deg, #f0b7a6, #e6957e);
}

.chuviet-help {
    margin-top: 18px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.5);
    border: 1px solid #e6d8bd;
    border-radius: 8px;
    color: #4a3b25;
    font-size: 14px;
    line-height: 1.6;
}

.chuviet-help summary {
    cursor: pointer;
    font-weight: bold;
    color: #6b4a17;
}

.chuviet-help ul {
    margin: 10px 0 0;
    padding-left: 20px;
}

.chuviet-help li {
    margin-bottom: 8px;
}

.chuviet-help kbd {
    background: #eee;
    border: 1px solid #ccc;
    border-radius: 3px;
    padding: 1px 5px;
    font-family: monospace;
}

.chuviet-credit {
    margin-top: 14px;
    padding-top: 10px;
    border-top: 1px dashed #d8c6a8;
    font-size: 12px;
    color: #8a7a5f;
    font-style: italic;
}

/* ---- Popup Tim & sua ---- */
.chuviet-popup {
    position: fixed;
    top: 80px;
    left: 40px;
    width: 380px;
    z-index: 1000;
    background: #f5efe0;
    border: 2px solid #b98a3e;
    border-radius: 10px;
    box-shadow: 0 6px 24px rgba(0, 0, 0, 0.3);
    font-family: Verdana, Arial, sans-serif;
    font-size: 13px;
}

.chuviet-popup-title {
    background: linear-gradient(135deg, #b98a3e, #8a6529);
    color: #fff;
    padding: 8px 14px;
    border-radius: 8px 8px 0 0;
    cursor: move;
    font-weight: bold;
    touch-action: none;
    user-select: none;
}

.chuviet-popup-body {
    padding: 14px;
}

.chuviet-popup-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

.chuviet-popup-row label {
    flex: 0 0 90px;
    font-weight: bold;
    color: #4a3b25;
}

.chuviet-popup-row input[type="text"],
.chuviet-popup-row select {
    flex: 1 1 auto;
    padding: 4px 6px;
    border: 1px solid #d8c6a8;
    border-radius: 5px;
}

.chuviet-popup-row input[type="checkbox"] {
    flex: 0 0 auto;
}

.chuviet-popup-actions {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 6px;
}

@media (max-width: 600px) {
    .chuviet-toolbar {
        flex-direction: column;
        align-items: flex-start;
    }

    .chuviet-popup {
        left: 10px;
        right: 10px;
        width: auto;
    }
}
