/* Decision Card Styles */

.decision-card {
    background: white;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    padding: 24px;
    max-width: 800px;
    margin-bottom: 24px;
    animation: fadeIn 0.3s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.decision-card.removing {
    animation: fadeOut 0.3s ease-out forwards;
}

@keyframes fadeOut {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-10px); }
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 16px;
    border-bottom: 1px solid #eee;
    padding-bottom: 12px;
}

.card-title {
    font-size: 18px;
    font-weight: 700;
    color: #2c3e50;
}

.card-subtitle {
    font-size: 14px;
    color: #7f8c8d;
    margin-top: 4px;
}

.time-elapsed {
    font-size: 12px;
    color: #95a5a6;
    text-align: right;
}

.sov-section {
    margin: 24px 0;
    padding: 24px;
    background: #f8f9fa;
    border-radius: 6px;
    text-align: center;
}

.sov-score {
    font-size: 48px;
    font-weight: 700;
    line-height: 1;
    margin-bottom: 8px;
}

.sov-score.positive { color: #27ae60; }
.sov-score.negative { color: #e74c3c; }
.sov-score.neutral { color: #34495e; }

.sov-change {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 16px;
    font-weight: 600;
    margin-top: 8px;
}

.sov-change.positive { color: #27ae60; }
.sov-change.negative { color: #e74c3c; }
.sov-change.neutral { color: #95a5a6; }

.keywords-section {
    margin: 24px 0;
}

.keywords-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.keywords-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.keywords-table th {
    background: #ecf0f1;
    padding: 8px 12px;
    text-align: left;
    font-weight: 600;
    color: #2c3e50;
    border: none;
}

.keywords-table td {
    padding: 8px 12px;
    border: none;
}

.keywords-table tbody tr:nth-child(odd) {
    background: #f8f9fa;
}

.keywords-table tbody tr:hover {
    background: #ecf0f1;
}

.competitors-section {
    margin: 24px 0;
}

.competitors-section h3 {
    font-size: 14px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.competitor-item {
    margin-bottom: 16px;
}

.competitor-name {
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 4px;
}

.competitor-bar {
    background: #ecf0f1;
    height: 24px;
    border-radius: 4px;
    overflow: hidden;
    margin-bottom: 4px;
}

.competitor-bar-fill {
    background: linear-gradient(90deg, #3498db, #2980b9);
    height: 100%;
    transition: width 0.2s ease;
}

.competitor-sov {
    font-size: 12px;
    color: #7f8c8d;
    text-align: right;
}

.decision-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 24px;
    border-top: 1px solid #ecf0f1;
    padding-top: 24px;
}

.decision-btn {
    padding: 12px 16px;
    min-height: 44px;
    border: none;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.decision-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.btn-approve { background: #27ae60; color: white; }
.btn-approve:hover { background: #229954; }

.btn-approve-note { background: #3498db; color: white; }
.btn-approve-note:hover { background: #2980b9; }

.btn-adjust { background: #f39c12; color: white; }
.btn-adjust:hover { background: #d68910; }

.btn-escalate { background: #e74c3c; color: white; }
.btn-escalate:hover { background: #c0392b; }

.input-group {
    grid-column: 1 / -1;
    display: grid;
    gap: 8px;
    margin-top: 12px;
}

.input-group textarea,
.input-group input {
    padding: 10px 12px;
    border: 1px solid #bdc3c7;
    border-radius: 4px;
    font-size: 14px;
    font-family: inherit;
}

.input-group button {
    padding: 10px 16px;
    background: #3498db;
    color: white;
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.2s ease;
}

.input-group button:hover {
    background: #2980b9;
}

@media (max-width: 768px) {
    .decision-card { padding: 16px; margin-bottom: 16px; }
    .sov-score { font-size: 36px; }
    .decision-actions { grid-template-columns: 1fr; }
}

/* Navigation Styles */
.decision-nav {
    display: flex;
    gap: 1.5rem;
}

.nav-link {
    text-decoration: none;
    color: #3498db;
    font-weight: 600;
    font-size: 14px;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.nav-link:hover {
    color: #2980b9;
    border-bottom-color: #2980b9;
}

.nav-link.active {
    color: #2c3e50;
    border-bottom-color: #3498db;
}
/* Blog Card Styles */
.decision-card.blog-card {
    border-left: 4px solid #3498db;
}

.card-header.blog-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
}

.blog-title-section {
    flex: 1;
}

.blog-title {
    font-size: 18px;
    font-weight: 700;
    margin: 0 0 8px 0;
    color: #2c3e50;
    max-width: 600px;
}

.blog-image {
    width: 100%;
    height: 200px;
    overflow: hidden;
    background: #ecf0f1;
    border: 1px solid #bdc3c7;
}

.blog-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.blog-content {
    padding: 20px;
}

.blog-excerpt {
    color: #555;
    font-size: 14px;
    line-height: 1.6;
    margin-bottom: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-left: 3px solid #3498db;
    border-radius: 2px;
}

.blog-metadata {
    display: flex;
    gap: 15px;
    flex-wrap: wrap;
    font-size: 13px;
    color: #7f8c8d;
}

.meta-item {
    padding: 4px 8px;
    background: #ecf0f1;
    border-radius: 3px;
}

.meta-item strong {
    color: #2c3e50;
    font-weight: 600;
}

.btn-reject {
    background: #e74c3c;
    color: white;
}

.btn-reject:hover {
    background: #c0392b;
}

/* ===== Mobile Responsive ===== */
@media (max-width: 640px) {
    body { font-size: 15px; }
    .decision-card { padding: 14px; margin-bottom: 14px; border-radius: 6px; }
    .card-title { font-size: 16px; }
    .card-header { flex-wrap: wrap; gap: 8px; }
    .sov-score { font-size: 42px; }
    .sov-section { padding: 16px; }
    .decision-actions { grid-template-columns: 1fr 1fr; gap: 8px; }
    .decision-btn { padding: 10px 8px; font-size: 13px; min-height: 44px; }
    .keywords-table th, .keywords-table td { padding: 6px 8px; font-size: 13px; }
    .blog-image { height: 160px; }
    .blog-metadata { gap: 8px; }
    .stats { grid-template-columns: 1fr 1fr; gap: 12px; }
    .stat-card { padding: 16px 12px; }
    .stat-value { font-size: 28px; }
    nav.main-nav { flex-wrap: wrap; gap: 8px; }
    .container { padding: 0 12px; }
    h1 { font-size: 22px; }
    h2 { font-size: 18px; }
}

@media (max-width: 380px) {
    .decision-actions { grid-template-columns: 1fr; }
    .sov-score { font-size: 36px; }
}

/* ===== Full Content Modal ===== */
#content-modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.6);
    z-index: 1000;
    align-items: flex-start;
    justify-content: center;
    padding: 20px;
    overflow-y: auto;
}

.modal-box {
    background: white;
    border-radius: 8px;
    width: 100%;
    max-width: 800px;
    margin: auto;
    padding: 0;
    box-shadow: 0 8px 40px rgba(0,0,0,0.3);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #eee;
    position: sticky;
    top: 0;
    background: white;
    border-radius: 8px 8px 0 0;
}

.modal-header h3 { margin: 0; font-size: 16px; color: #2c3e50; }

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #7f8c8d;
    line-height: 1;
    padding: 0;
}

.modal-close:hover { color: #2c3e50; }

#modal-body {
    padding: 24px;
    font-size: 15px;
    line-height: 1.7;
    color: #34495e;
    max-height: 70vh;
    overflow-y: auto;
}

#modal-body h1, #modal-body h2, #modal-body h3 { color: #2c3e50; margin-top: 1.5em; }
#modal-body p { margin-bottom: 1em; }
#modal-body img { max-width: 100%; height: auto; border-radius: 4px; }

.btn-read-full {
    display: inline-block;
    margin-top: 12px;
    padding: 8px 16px;
    background: #ecf0f1;
    border: none;
    border-radius: 4px;
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
    cursor: pointer;
    transition: background 0.2s;
}

.btn-read-full:hover { background: #dde4e6; }

/* ===== Stats grid mobile ===== */
.stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px;
    margin-bottom: 2rem;
}

.stat-card {
    background: white;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0,0,0,0.08);
}

.stat-value { font-size: 36px; font-weight: 700; color: #2c3e50; }
.stat-label { font-size: 13px; color: #7f8c8d; margin-top: 4px; }

@media (max-width: 768px) {
    .stats { grid-template-columns: 1fr 1fr; }
}

/* ===== User management table ===== */
.user-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.user-table th { background: #ecf0f1; padding: 10px 12px; text-align: left; font-weight: 600; color: #2c3e50; }
.user-table td { padding: 10px 12px; border-bottom: 1px solid #f0f0f0; vertical-align: middle; }
.user-table tr:hover td { background: #fafafa; }
.badge { display: inline-block; padding: 3px 8px; border-radius: 3px; font-size: 11px; font-weight: 700; }
.badge-admin { background: #3498db; color: white; }
.badge-active { background: #27ae60; color: white; }
.badge-inactive { background: #e74c3c; color: white; }
.btn-sm { padding: 5px 10px; font-size: 12px; border: none; border-radius: 4px; cursor: pointer; font-weight: 600; }
.btn-sm-danger { background: #e74c3c; color: white; }
.btn-sm-primary { background: #3498db; color: white; }

/* ===== Inline Blog Editor ===== */
.blog-editor-panel {
    margin-top: 16px;
    border: 2px solid #3498db;
    border-radius: 6px;
    overflow: hidden;
    grid-column: 1 / -1;
}

.editor-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 16px;
    background: #ebf5fb;
    font-size: 13px;
    font-weight: 600;
    color: #2c3e50;
    border-bottom: 1px solid #d6eaf8;
}

.editor-wc {
    font-weight: 400;
    color: #7f8c8d;
    font-size: 12px;
}

.editor-textarea {
    width: 100%;
    min-height: 320px;
    padding: 16px;
    font-size: 14px;
    line-height: 1.7;
    font-family: inherit;
    border: none;
    border-bottom: 1px solid #d6eaf8;
    resize: vertical;
    box-sizing: border-box;
    color: #2c3e50;
}

.editor-textarea:focus {
    outline: none;
    background: #fdfefe;
}

.editor-summary-input {
    width: 100%;
    padding: 10px 16px;
    font-size: 13px;
    font-family: inherit;
    border: none;
    border-bottom: 1px solid #d6eaf8;
    box-sizing: border-box;
    color: #555;
    background: #fafafa;
}

.editor-summary-input:focus {
    outline: none;
    background: white;
}

.editor-actions {
    display: flex;
    gap: 10px;
    padding: 12px 16px;
    background: #f8f9fa;
}

.btn-edit-approve {
    background: #8e44ad;
    color: white;
}

.btn-edit-approve:hover {
    background: #7d3c98;
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
}

@media (max-width: 640px) {
    .editor-textarea { min-height: 240px; font-size: 15px; }
    .editor-actions { flex-direction: column; }
}

/* Skip / Archive button */
.btn-skip {
    background: #bdc3c7;
    color: #2c3e50;
    font-size: 12px;
    grid-column: 1 / -1;
    opacity: 0.7;
}
.btn-skip:hover {
    background: #95a5a6;
    opacity: 1;
}

/* ===== Social Post Card ===== */
.decision-card.social-card {
    border-left: 4px solid #1877f2;
}

.social-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 20px 10px;
    background: linear-gradient(135deg, #f0f4ff 0%, #ffffff 100%);
    border-bottom: 1px solid #e8eef8;
}

.social-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

.social-platform-badge {
    background: #1877f2;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 0.5px;
}

.social-holiday-badge {
    background: #ff7043;
    color: white;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
}

.social-campaign-strip {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 10px 20px;
    background: #f8f9fa;
    border-bottom: 1px solid #eee;
    flex-wrap: wrap;
    gap: 8px;
}

.social-campaign {
    font-weight: 700;
    color: #2c3e50;
    font-size: 14px;
}

.social-date {
    font-size: 13px;
    color: #555;
    font-weight: 500;
}

.social-caption {
    padding: 16px 20px;
    font-size: 15px;
    line-height: 1.6;
    color: #2c3e50;
    border-bottom: 1px solid #f0f0f0;
}

.social-hashtags {
    padding: 8px 20px;
    font-size: 13px;
    color: #1877f2;
    font-weight: 500;
    border-bottom: 1px solid #f0f0f0;
}

.social-image-note {
    padding: 8px 20px 12px;
    font-size: 12px;
    color: #7f8c8d;
}

@media (max-width: 640px) {
    .social-caption { font-size: 14px; padding: 14px; }
    .social-campaign-strip { flex-direction: column; align-items: flex-start; }
}

/* ===== Social Inline Editor ===== */
.social-editor-panel {
    margin-top: 12px;
    border: 2px solid #1877f2;
    border-radius: 6px;
    overflow: hidden;
    grid-column: 1 / -1;
}

/* Tab count badges */
.tab-count {
    font-size: 11px;
    color: #7f8c8d;
    font-weight: 400;
    margin-left: 2px;
}

/* Social post image */
.social-image-container {
    width: 100%;
    max-height: 400px;
    overflow: hidden;
    background: #f0f0f0;
    border-bottom: 1px solid #eee;
}
.social-image-container img {
    width: 100%;
    height: auto;
    max-height: 400px;
    object-fit: cover;
    display: block;
}
.social-image-prompt {
    padding: 10px 20px;
    background: #f8f4ff;
    border-bottom: 1px solid #ede8f5;
    display: flex;
    gap: 10px;
    align-items: flex-start;
}
.image-prompt-label {
    font-size: 11px;
    font-weight: 700;
    color: #8e44ad;
    text-transform: uppercase;
    white-space: nowrap;
    padding-top: 2px;
}
.image-prompt-text {
    font-size: 13px;
    color: #555;
    font-style: italic;
    line-height: 1.5;
}
.social-caption {
    padding: 16px 20px;
    font-size: 15px;
    line-height: 1.7;
    color: #2c3e50;
    border-bottom: 1px solid #f0f0f0;
    white-space: pre-wrap;
    word-break: break-word;
}

/* ===== Compact Social Cards ===== */
.decision-card.social-card {
    padding: 0;
    margin-bottom: 12px;
}
.social-header {
    padding: 10px 14px 8px;
}
.social-campaign-strip {
    padding: 7px 14px;
}
.social-caption {
    padding: 10px 14px;
    font-size: 14px;
    line-height: 1.5;
}
.social-hashtags {
    padding: 6px 14px;
    font-size: 12px;
}
.social-image-prompt {
    padding: 6px 14px;
}
.decision-card.social-card .decision-actions {
    padding-top: 12px;
    gap: 8px;
}
.decision-card.social-card .decision-btn {
    padding: 8px 10px;
    font-size: 12px;
    min-height: 36px;
}

/* ===== Two-column layout for decision cards ===== */
#decisions-container {
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    align-items: start;
}

/* Blog cards stay full width — they have a lot of content */
#decisions-container .decision-card:not(.social-card) {
    grid-column: 1 / -1;
}

@media (max-width: 900px) {
    #decisions-container {
        grid-template-columns: 1fr !important;
    }
}
