/* Voice Board Styles */
.dpfp-voice-board {
    background: #f9f9f9;
    min-height: 100vh;
}

/* Hero & Tracker */
.voice-tracker-hero {
    background: linear-gradient(135deg, var(--dpfp-blue) 0%, #0652a8 100%);
    color: #fff;
    padding: 60px 0 100px;
    /* Reduced back to reasonable size */
    text-align: center;
    position: relative;
}

.page-title {
    font-size: clamp(1.2rem, 4vw, 2.5rem);
    /* Responsive font size */
    font-weight: 900;
    margin-bottom: 10px;
    white-space: nowrap;
    /* Force single line */
    overflow: hidden;
    text-overflow: ellipsis;
    padding: 0 10px;
    /* Prevent edge touching */
}

.page-desc {
    font-size: 1rem;
    opacity: 0.9;
    margin-bottom: 40px;
}

.tracker-dashboard {
    display: flex;
    justify-content: center;
    gap: 15px;
    /* Reduced gap */
    flex-wrap: nowrap;
    /* Force single row */
    width: 100%;
    max-width: 800px;
    /* Limit width on large screens */
    margin: 0 auto;
}

.tracker-item {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 15px 10px;
    /* Reduced padding */
    border-radius: 12px;
    flex: 1;
    /* Equal width */
    min-width: 0;
    /* Allow shrinking */
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.tracker-item.realized {
    background: rgba(6, 82, 168, 0.3);
    /* Blueish for Delivered */
    border-color: rgba(6, 82, 168, 0.5);
}

.tracker-item.realized-only {
    background: rgba(238, 185, 2, 0.2);
    /* Gold for Realized */
    border-color: rgba(238, 185, 2, 0.4);
}

.tracker-label {
    display: block;
    font-size: clamp(0.7rem, 2vw, 0.9rem);
    /* Responsive font */
    margin-bottom: 5px;
    font-weight: 700;
    white-space: nowrap;
}

.tracker-count {
    font-size: clamp(1.5rem, 5vw, 3rem);
    /* Responsive font */
    font-weight: 900;
    line-height: 1;
}

.tracker-unit {
    font-size: 0.8rem;
    font-weight: 700;
    margin-left: 2px;
}

/* Layout */
.voice-content-layout {
    display: grid;
    grid-template-columns: 350px 1fr;
    gap: 40px;
    margin-top: -40px;
    padding-bottom: 80px;
    position: relative;
    z-index: 10;
}

/* Submission Form */
.submission-card {
    background: #fff;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 40px;
}

.section-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--dpfp-blue);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-weight: 700;
    margin-bottom: 8px;
    font-size: 0.9rem;
}

.form-group input,
.form-group textarea {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 8px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus,
.form-group textarea:focus {
    border-color: var(--dpfp-blue);
    outline: none;
    box-shadow: 0 0 0 3px rgba(4, 62, 128, 0.1);
}

.submit-voice-btn {
    width: 100%;
    background: var(--dpfp-yellow);
    color: #333;
    border: none;
    padding: 15px;
    border-radius: 50px;
    font-weight: 700;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.3s;
}

.submit-voice-btn:hover {
    background: #ffc107;
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(238, 185, 2, 0.3);
}

.alert-success {
    background: #d4edda;
    color: #155724;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    border: 1px solid #c3e6cb;
}

/* Voice List */
.voice-list-section {
    padding-top: 60px;
    /* Push down to avoid overlap with hero */
}

.voice-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.voice-card {
    background: #fff;
    padding: 25px;
    border-radius: 16px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.03);
    transition: transform 0.3s;
    border: 1px solid rgba(0, 0, 0, 0.03);
    position: relative;
    overflow: hidden;
}

.voice-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.voice-status-badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 700;
    margin-bottom: 15px;
    background: #eee;
    color: #555;
}

.voice-card.status-realized .voice-status-badge {
    background: var(--dpfp-yellow);
    color: #333;
}

.voice-card.status-in-progress .voice-status-badge {
    background: var(--dpfp-blue);
    color: #fff;
}

.voice-card.status-realized {
    border-top: 5px solid var(--dpfp-yellow);
}

.voice-title {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 10px;
    line-height: 1.4;
}

.voice-excerpt {
    font-size: 0.9rem;
    color: #666;
    line-height: 1.6;
    margin-bottom: 15px;
}

.voice-meta {
    font-size: 0.8rem;
    color: #999;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-top: 15px;
    padding-top: 15px;
    border-top: 1px dashed #eee;
}

.voice-like-btn {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 50px;
    padding: 8px 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.voice-like-btn:hover {
    background: #fff0f5;
    border-color: #ff69b4;
    color: #ff69b4;
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(255, 105, 180, 0.2);
}

.voice-like-btn.liked {
    background: linear-gradient(135deg, #ff69b4 0%, #ff1493 100%);
    border-color: transparent;
    color: #fff;
    box-shadow: 0 5px 15px rgba(255, 20, 147, 0.3);
    transform: scale(1.05);
}

.voice-like-btn i {
    font-size: 1.1rem;
    transition: transform 0.3s;
}

.voice-like-btn.liked i {
    font-weight: 900;
    animation: heartPop 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

@keyframes heartPop {
    0% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.5);
    }

    100% {
        transform: scale(1);
    }
}

/* Sort Controls */
.voice-sort-select {
    padding: 8px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 0.9rem;
    color: #333;
    background: #fff;
    cursor: pointer;
    outline: none;
    transition: border-color 0.3s;
}

.voice-sort-select:focus {
    border-color: var(--dpfp-blue);
}

/* Responsive */
@media (max-width: 900px) {
    .voice-content-layout {
        grid-template-columns: 1fr;
    }

    .submission-card {
        position: static;
        margin-bottom: 40px;
    }

    .voice-list-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
}

/* Actions Wrapper */
.voice-actions {
    display: flex;
    gap: 10px;
}

/* Comment Button */
.voice-comment-btn {
    background: #fff;
    border: 1px solid #e0e0e0;
    border-radius: 50px;
    padding: 8px 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    color: #666;
    font-size: 0.9rem;
    font-weight: 700;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.voice-comment-btn:hover {
    background: #f0f8ff;
    border-color: var(--dpfp-blue);
    color: var(--dpfp-blue);
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(4, 62, 128, 0.2);
}

/* Share Button */
.voice-share-btn {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #fff;
    border: 1px solid #000;
    border-radius: 50%;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #000;
    font-size: 1rem;
    transition: all 0.3s;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    text-decoration: none;
    z-index: 5;
}

.voice-share-btn svg {
    display: block;
    width: 16px;
    height: 16px;
}

.voice-share-btn:hover {
    background: #f9f9f9;
    border-color: #333;
    transform: translateY(-2px);
    box-shadow: 0 5px 10px rgba(0, 0, 0, 0.1);
    color: #000;
}

/* Modal Styles */
.voice-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.6);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(5px);
}

.voice-modal-content {
    background: #fff;
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    border-radius: 16px;
    padding: 25px;
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.2);
}

.voice-modal-close {
    position: absolute;
    top: 15px;
    right: 15px;
    background: none;
    border: none;
    font-size: 1.2rem;
    color: #999;
    cursor: pointer;
    transition: color 0.3s;
}

.voice-modal-close:hover {
    color: #333;
}

.voice-modal-title {
    font-size: 1.2rem;
    font-weight: 700;
    margin-bottom: 20px;
    color: var(--dpfp-blue);
    border-bottom: 1px solid #eee;
    padding-bottom: 10px;
}

.voice-modal-comments-list {
    flex: 1;
    overflow-y: auto;
    margin-bottom: 20px;
    padding-right: 5px;
}

.voice-comment-item {
    background: #f9f9f9;
    padding: 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    font-size: 0.9rem;
}

.voice-comment-meta {
    display: flex;
    justify-content: space-between;
    font-size: 0.8rem;
    color: #999;
    margin-bottom: 5px;
}

.voice-comment-form {
    display: flex;
    gap: 10px;
    border-top: 1px solid #eee;
    padding-top: 15px;
}

.voice-comment-form textarea {
    flex: 1;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 8px;
    resize: none;
    font-size: 0.9rem;
}

.submit-comment-btn {
    background: var(--dpfp-blue);
    color: #fff;
    border: none;
    padding: 0 20px;
    border-radius: 8px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.3s;
}

.submit-comment-btn:hover {
    background: #0652a8;
}

.voice-loading {
    text-align: center;
    color: #999;
    padding: 20px;
}

/* Detail Modal Specifics */
.voice-detail-content {
    max-width: 700px;
    /* Wider than comment modal */
}

.voice-detail-header {
    display: flex;
    align-items: center;
    margin-bottom: 15px;
    padding-right: 30px;
    /* Space for close button */
}

.voice-modal-close {
    z-index: 20;
    /* Ensure above other elements */
}

.read-more-link:hover {
    text-decoration: underline;
}

/* Prevent body scroll when modal is open */
body.modal-open {
    overflow: hidden;
}

/* Load More Button */
.load-more-wrapper {
    text-align: center;
    margin: 40px 0;
}

.load-more-btn {
    background: linear-gradient(135deg, #043e80 0%, #0056b3 100%);
    color: white;
    border: none;
    padding: 15px 40px;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(4, 62, 128, 0.3);
    display: inline-flex;
    align-items: center;
    gap: 10px;
}

.load-more-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(4, 62, 128, 0.4);
}

.load-more-btn:active {
    transform: translateY(0);
}

.load-more-btn:disabled,
.load-more-btn.disabled {
    background: #ccc;
    cursor: not-allowed;
    box-shadow: none;
}

.load-more-btn i {
    transition: transform 0.3s ease;
}

.load-more-btn:hover i {
    transform: translateY(2px);
}

.loading-indicator {
    color: #043e80;
    font-size: 1.1rem;
    margin-top: 20px;
}

.loading-indicator i {
    margin-right: 8px;
}