/* PVHRC Custom Comment Styles */

/* --- Container --- */
.pvhrc-comments-section {
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid var(--gray-light, #eee);
}

/* --- Form Wrapper --- */
.pvhrc-form-wrapper {
    background: #f9f9f9;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 2rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.02);
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid #eee;
    padding-bottom: 1rem;
}

/* --- Comment Card --- */
.comment-card {
    padding: 0.25rem 0; /* Reduced from 0.5rem to tighten the overall block */
    margin-bottom: 0.5rem; 
    display: block; 
    width: 100%;
}

/* --- Comment Header (Row 1) --- */
.comment-meta {
    display: flex;
    flex-flow: row wrap;
    justify-content: flex-start;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0; /* Changed from 0.25rem to 0 to remove gap */
    width: 100%;
    font-weight: 700;
}

.comment-meta > span,
.comment-meta > time,
.comment-meta > button {
    display: inline-block;
    width: auto;
    margin: 0;
}

.comment-author {
    color: #222;
}

.comment-separator {
    color: #ccc;
    font-size: 0.8rem;
    font-weight: normal;
    display: inline-block;
}

.comment-date {
    color: #777;
    font-size: 0.85rem;
    font-weight: normal;
}

/* --- Comment Content (Row 2) --- */
.comment-content {
    margin-bottom: 0rem;
    margin-top: -0.5em; /* Added negative margin to pull text up against the meta row */
    display: block;
    width: 100%;
}

.value-content {
    font-size: 1rem;
    line-height: 1.4; /* Reduced from 1.6 to tighten line spacing */
    color: #222;
    display: inline-block; /* Helps collapse literal leading whitespace in some browsers */
    white-space: pre-wrap; 
    word-wrap: break-word; 
}

/* --- Reply Button --- */
.pvhrc-reply-btn {
    background: none;
    border: none;
    padding: 6px 12px;
    font-size: 0.85rem;
    color: #666;
    cursor: pointer;
    font-weight: 600;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    transition: all 0.2s;
    border-radius: 4px;
    vertical-align: baseline;
    margin-left: 0;
}

.pvhrc-reply-btn:hover,
.pvhrc-reply-btn:focus {
    color: var(--primary-color, #004080);
    text-decoration: none;
    background-color: #e0e0e0;
    box-shadow: none;
}

/* --- Threading & List Structure --- */

ul.comments-list {
    list-style: none;
    padding-left: 0;
    margin: 0;
}

ul.comments-list.root-level > li.comment-item {
    border-bottom: 1px solid var(--gray-light, #eee);
    padding-bottom: 1rem;
    margin-bottom: 1rem;
}

ul.comments-list.root-level > li.comment-item:last-child {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

ul.comments-list.children-level {
    margin-top: 1rem;      
    margin-left: 1.5rem;   
    padding-left: 1rem;    
    border-left: 2px solid #e0e0e0; 
}

ul.comments-list.children-level > li.comment-item {
    margin-bottom: 0.5rem;
    padding-bottom: 0.5rem;
}

ul.comments-list.children-level > li.comment-item:last-child {
    margin-bottom: 0;
    padding-bottom: 0;
}


/* --- Hidden / Private Comment Styling --- */
.comment-card.comment-private {
    background-color: #fff9e6;
    border: 1px solid #ffeeba;
    border-left: 4px solid #ffc107;
    padding: 0.5rem 1rem; 
    border-radius: 4px;
    margin-bottom: 1rem;
}

/* --- Admin Controls Container --- */
.comment-admin-controls {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-left: auto; 
    font-weight: normal;
}

/* --- Switch / Toggle / Delete Button Styling --- */
.toggle-wrapper {
    position: relative;
    display: inline-flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.toggle-label {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #666;
    font-weight: 600;
    cursor: default;
    line-height: 1;
}

.pvhrc-delete-comment-btn {
    background: none;
    border: 1px solid #ccc;
    color: #d32f2f;
    border-radius: 4px;
    padding: 2px 8px;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pvhrc-delete-comment-btn:hover {
    background-color: #d32f2f;
    color: white;
    border-color: #d32f2f;
}

.toggle-wrapper:hover::after {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 120%;
    left: 50%;
    transform: translateX(-50%);
    background: #333;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    white-space: nowrap;
    z-index: 10;
    pointer-events: none;
}

.pvhrc-switch {
    position: relative;
    display: inline-block;
    width: 34px;
    height: 20px;
    margin-bottom: 0;
}

.pvhrc-switch input { opacity: 0; width: 0; height: 0; margin: 0; }

.slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 20px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 14px;
    width: 14px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
    z-index: 2;
}

input:checked + .slider { background-color: #2e7d32; }
input:focus + .slider { box-shadow: 0 0 1px #2e7d32; }
input:checked + .slider:before { transform: translateX(14px); }

input[data-action="flag"]:checked + .slider { background-color: #ff9800; }
input[data-action="spam"]:checked + .slider { background-color: #d32f2f; }

.toggle-icon { display: none; }