/**
 * Single Roadmap Item Styles
 * StackOverflow-style layout with voting on the left
 *
 * @package ProductRoadmap
 * @since 1.3.0
 */

/* Wrapper */
.roadmap-single-wrapper {
    max-width: 900px;
    margin: 0 auto;
    padding: 30px 20px;
}

/* Breadcrumb Navigation */
.roadmap-single-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 24px;
    font-size: 14px;
    color: #64748b;
}

.roadmap-single-breadcrumb a {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s;
}

.roadmap-single-breadcrumb a:hover {
    color: #2563eb;
}

.roadmap-single-breadcrumb .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
}

.roadmap-single-breadcrumb .separator {
    color: #cbd5e1;
}

/* Main Layout - Voting | Content */
.roadmap-single-layout {
    display: flex;
    gap: 24px;
    align-items: flex-start;
}

/* Voting Section (Left) */
.roadmap-single-voting {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    padding: 16px 12px;
    background: #ffffff;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
    position: sticky;
    top: 100px;
    min-width: 70px;
}

.roadmap-vote-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    background: #f8fafc;
    border: 2px solid #e2e8f0;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #64748b;
}

/* Up vote button hover - green for adding vote */
.roadmap-vote-btn.roadmap-vote-up:hover {
    border-color: #10b981;
    color: #10b981;
    background: #f0fdf4;
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.15);
}

/* Down vote button hover - neutral gray for removing vote */
.roadmap-vote-btn.roadmap-vote-down:hover {
    border-color: #94a3b8;
    color: #64748b;
    background: #f1f5f9;
    transform: translateY(1px);
    box-shadow: 0 2px 8px rgba(100, 116, 139, 0.12);
}

.roadmap-vote-btn svg {
    width: 20px;
    height: 20px;
}

/* Active up vote - solid green */
.roadmap-vote-btn.roadmap-vote-up.active {
    background: #10b981;
    border-color: #10b981;
    color: #fff;
}

.roadmap-vote-btn.roadmap-vote-up.active:hover {
    background: #059669;
    border-color: #059669;
    color: #fff;
    transform: translateY(-1px);
}

/* Down button when up is active - shows option to remove */
.roadmap-vote-up.active ~ .roadmap-vote-down:hover,
.roadmap-single-voting:has(.roadmap-vote-up.active) .roadmap-vote-down:hover {
    border-color: #f97316;
    color: #ea580c;
    background: #fff7ed;
    box-shadow: 0 2px 8px rgba(249, 115, 22, 0.12);
}

.roadmap-vote-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.roadmap-vote-btn.voting {
    pointer-events: none;
}

.roadmap-vote-btn.voting svg {
    animation: pulse 0.5s ease;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.2); }
}

.roadmap-vote-count {
    font-size: 28px;
    font-weight: 700;
    color: #1e293b;
    line-height: 1.2;
    margin: 8px 0 2px;
}

.roadmap-vote-label {
    font-size: 12px;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
    margin-bottom: 8px;
}

/* Main Content Section (Right) */
.roadmap-single-main {
    flex: 1;
    min-width: 0;
}

/* Header */
.roadmap-single-header {
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e2e8f0;
}

.roadmap-single-title {
    margin: 0 0 16px 0;
    font-size: 28px;
    font-weight: 700;
    line-height: 1.3;
    color: #1e293b !important;
}

/* Override theme styles for title */
.roadmap-single-wrapper h1.roadmap-single-title,
.roadmap-single-wrapper .roadmap-single-title {
    color: #1e293b !important;
    text-decoration: none !important;
}

/* Badges */
.roadmap-single-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 16px;
}

.roadmap-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 12px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    border: 1px solid transparent;
}

.roadmap-badge-status {
    background: #e0f2fe;
    color: #0369a1;
    border-color: #7dd3fc;
}

.roadmap-badge-category {
    background: #f3e8ff;
    color: #7c3aed;
    border-color: #c4b5fd;
}

/* Meta Info */
.roadmap-single-meta-info {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    font-size: 14px;
    color: #64748b;
}

.roadmap-single-meta-info .meta-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.roadmap-single-meta-info .dashicons {
    font-size: 16px;
    width: 16px;
    height: 16px;
    color: #94a3b8;
}

/* Content */
.roadmap-single-content {
    margin: 24px 0;
    font-size: 16px;
    line-height: 1.75;
    color: #334155;
}

.roadmap-single-content h2 {
    margin-top: 32px;
    margin-bottom: 16px;
    font-size: 22px;
    font-weight: 600;
    color: #1e293b;
}

.roadmap-single-content h3 {
    margin-top: 24px;
    margin-bottom: 12px;
    font-size: 18px;
    font-weight: 600;
    color: #1e293b;
}

.roadmap-single-content p {
    margin-bottom: 16px;
}

.roadmap-single-content ul,
.roadmap-single-content ol {
    margin-bottom: 16px;
    padding-left: 24px;
}

.roadmap-single-content li {
    margin-bottom: 8px;
}

.roadmap-single-content a {
    color: #2563eb;
    text-decoration: none;
}

.roadmap-single-content a:hover {
    text-decoration: underline;
}

.roadmap-single-content code {
    padding: 2px 6px;
    background: #f1f5f9;
    border-radius: 4px;
    font-size: 14px;
    color: #0f172a;
}

.roadmap-single-content pre {
    padding: 16px;
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    overflow-x: auto;
}

.roadmap-single-content pre code {
    padding: 0;
    background: none;
}

.roadmap-single-content blockquote {
    margin: 20px 0;
    padding: 16px 20px;
    background: #f8fafc;
    border-left: 4px solid #2563eb;
    border-radius: 0 8px 8px 0;
    font-style: italic;
    color: #475569;
}

.roadmap-single-content img {
    max-width: 100%;
    height: auto;
    border-radius: 8px;
    margin: 16px 0;
}

/* Completion Notes */
.roadmap-completion-notes {
    margin: 32px 0;
    padding: 24px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 12px;
}

.roadmap-completion-notes h3 {
    display: flex;
    align-items: center;
    gap: 8px;
    margin: 0 0 16px 0;
    font-size: 18px;
    font-weight: 600;
    color: #166534;
}

.roadmap-completion-notes h3 .dashicons {
    font-size: 20px;
    width: 20px;
    height: 20px;
    color: #22c55e;
}

.roadmap-completion-content {
    font-size: 15px;
    line-height: 1.7;
    color: #15803d;
}

.roadmap-completion-content p {
    margin: 0 0 12px 0;
}

.roadmap-completion-content p:last-child {
    margin-bottom: 0;
}

/* Footer */
.roadmap-single-footer {
    margin-top: 32px;
    padding-top: 20px;
    border-top: 1px solid #e2e8f0;
}

.roadmap-single-product {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: #f8fafc;
    border-radius: 8px;
    font-size: 14px;
    color: #64748b;
}

.roadmap-single-product .dashicons {
    color: #94a3b8;
}

.roadmap-single-product a {
    color: #2563eb;
    text-decoration: none;
    font-weight: 500;
}

.roadmap-single-product a:hover {
    text-decoration: underline;
}

/* Comments Section */
.roadmap-single-comments {
    margin-top: 40px;
    padding-top: 32px;
    border-top: 1px solid #e2e8f0;
}

/* Notification Toast */
.roadmap-notification {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) scale(0.9);
    padding: 16px 24px;
    background: #fff;
    color: #1e293b;
    border-radius: 12px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    font-size: 15px;
    font-weight: 500;
    text-align: center;
    min-width: 280px;
    z-index: 99999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.roadmap-notification.show {
    opacity: 1;
    visibility: visible;
    transform: translate(-50%, -50%) scale(1);
}

.roadmap-notification.success {
    border-left: 4px solid #10b981;
}

.roadmap-notification.success::before {
    content: "✓";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-right: 12px;
    background: #d1fae5;
    color: #10b981;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
}

.roadmap-notification.error {
    border-left: 4px solid #ef4444;
}

.roadmap-notification.error::before {
    content: "✕";
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 24px;
    height: 24px;
    margin-right: 12px;
    background: #fee2e2;
    color: #ef4444;
    border-radius: 50%;
    font-size: 14px;
    font-weight: bold;
}

/* Responsive */
@media (max-width: 768px) {
    .roadmap-single-wrapper {
        padding: 20px 16px;
    }

    .roadmap-single-layout {
        flex-direction: column;
        gap: 20px;
    }

    .roadmap-single-voting {
        flex-direction: row;
        position: static;
        width: 100%;
        justify-content: center;
        padding: 12px 20px;
        gap: 16px;
        background: #ffffff;
        border: 1px solid #e2e8f0;
        border-radius: 12px;
    }

    .roadmap-vote-btn {
        width: 48px;
        height: 48px;
        background: #f8fafc;
    }

    .roadmap-vote-count {
        font-size: 24px;
        margin: 0;
        color: #1e293b;
    }

    .roadmap-vote-label {
        margin: 0;
        color: #64748b;
    }

    .roadmap-single-title {
        font-size: 24px;
        color: #1e293b !important;
    }

    .roadmap-single-meta-info {
        gap: 12px;
    }
}

@media (max-width: 480px) {
    .roadmap-single-breadcrumb {
        font-size: 13px;
    }

    .roadmap-single-title {
        font-size: 22px;
    }

    .roadmap-single-badges {
        gap: 6px;
    }

    .roadmap-badge {
        font-size: 12px;
        padding: 4px 10px;
    }

    .roadmap-single-content {
        font-size: 15px;
    }
}

/* Theme Compatibility - Override common theme styles */
.roadmap-single-wrapper,
.roadmap-single-wrapper * {
    box-sizing: border-box;
}

.roadmap-single-wrapper a {
    text-decoration: none;
}

.roadmap-single-wrapper a:hover {
    text-decoration: underline;
}

/* Ensure content area inherits properly */
.roadmap-single-content {
    color: #334155;
}

.roadmap-single-content a {
    color: #2563eb;
}

/* Strong overrides for theme compatibility */
.roadmap-single-wrapper h1,
.roadmap-single-wrapper .roadmap-single-title,
h1.roadmap-single-title,
.roadmap-single-article h1 {
    color: #1e293b !important;
    opacity: 1 !important;
    visibility: visible !important;
}

.roadmap-single-wrapper .roadmap-vote-count {
    color: #1e293b !important;
}

.roadmap-single-wrapper .roadmap-vote-label {
    color: #64748b !important;
}
