/* Popup Styles */
#tcn-popup-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 10000;
}

#tcn-popup-container {
    background-color: #ffffff !important;
    padding: 30px 25px 25px 25px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
    width: 90%;
    max-width: 420px;
    text-align: center;
    position: relative;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-sizing: border-box;
}

#tcn-close-popup {
    display: inline-block;
    margin-top: 12px;
    background: none;
    border: none;
    font-size: 11px;
    line-height: 1.4;
    cursor: pointer;
    color: #999999;
    padding: 0;
    text-decoration: underline;
    transition: color 0.2s ease;
}

#tcn-close-popup:hover {
    color: #555555;
}

#tcn-popup-container h3 {
    margin-top: 5px;
    margin-bottom: 12px;
    padding-right: 20px;
    color: #222222 !important;
    font-size: 22px;
    font-weight: 700;
}

#tcn-popup-container p {
    margin-bottom: 18px;
    padding-right: 15px;
    color: #555555 !important;
    font-size: 15px;
    line-height: 1.4;
}

.tcn-form-field {
    margin-bottom: 16px;
    text-align: left;
}

.tcn-form-field label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    color: #444444 !important;
    font-size: 14px;
}

.tcn-form-field input {
    width: 100%;
    padding: 11px 14px;
    border: 1px solid #cccccc;
    border-radius: 6px;
    box-sizing: border-box;
    font-size: 15px;
    color: #222222 !important;
    background-color: #ffffff !important;
}

#tcn-submit-button {
    background-color: #0073e6;
    color: #ffffff !important;
    padding: 12px 20px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    width: 100%;
    font-size: 17px;
    font-weight: 600;
    transition: background-color 0.3s ease;
    margin-top: 5px;
}

#tcn-submit-button:hover {
    background-color: #005bb5;
}

#tcn-submit-button:disabled {
    background-color: #a0a0a0;
    cursor: not-allowed;
}

#tcn-feedback {
    margin-top: 15px;
    padding: 10px 12px;
    border-radius: 6px;
    font-size: 14px;
}

#tcn-feedback.success {
    background-color: #d4edda;
    color: #155724 !important;
    border: 1px solid #c3e6cb;
}

#tcn-feedback.error {
    background-color: #f8d7da;
    color: #721c24 !important;
    border: 1px solid #f5c6cb;
}

/* Legal Disclaimer Text Styling - Ensures dark text on white popup background */
.tcn-legal-message,
.tcn-privacy {
    font-size: 11px;
    color: #555555 !important;
    margin-top: 14px;
    line-height: 1.45;
    text-align: center;
    padding: 0 5px;
}

.tcn-legal-message a,
.tcn-privacy a {
    color: #0073e6 !important;
    text-decoration: underline;
}

.tcn-legal-message a:hover,
.tcn-privacy a:hover {
    color: #005bb5 !important;
}

/* Re-open Link */
#tcn-reopen-popup {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background-color: #0073e6;
    color: #ffffff !important;
    padding: 10px 15px;
    border-radius: 6px;
    text-decoration: none;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 999;
}

/* --- Live Buzz Menu Highlights & Badges --- */
.tcn-glowing-dot {
    display: inline-block;
    width: 9px;
    height: 9px;
    border-radius: 50%;
    background-color: #ff5722;
    box-shadow: 0 0 8px #ff5722;
    margin-left: 6px;
    vertical-align: middle;
    animation: tcn-pulse-glow 1.6s infinite ease-in-out;
}

.tcn-glowing-dot.green {
    background-color: #4caf50;
    box-shadow: 0 0 8px #4caf50;
}

@keyframes tcn-pulse-glow {
    0% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 87, 34, 0.7);
    }
    70% {
        transform: scale(1.15);
        box-shadow: 0 0 0 7px rgba(255, 87, 34, 0);
    }
    100% {
        transform: scale(0.95);
        box-shadow: 0 0 0 0 rgba(255, 87, 34, 0);
    }
}

.tcn-menu-new-badge {
    background-color: #ff5722;
    color: #ffffff !important;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 10px;
    margin-left: 6px;
    vertical-align: middle;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* --- Homepage Live Buzz Banner Styles --- */
.tcn-banner-container {
    background: linear-gradient(135deg, #0073e6 0%, #004b99 100%);
    color: #ffffff !important;
    border-radius: 12px;
    padding: 28px 24px;
    margin: 25px auto;
    max-width: 1100px;
    box-shadow: 0 6px 18px rgba(0, 115, 230, 0.2);
    text-align: center;
}

.tcn-banner-content {
    max-width: 800px;
    margin: 0 auto;
}

.tcn-banner-title {
    color: #ffffff !important;
    font-size: 26px;
    font-weight: 800;
    margin: 0 0 10px 0;
    letter-spacing: -0.3px;
}

.tcn-banner-text {
    color: #e6f0ff !important;
    font-size: 16px;
    line-height: 1.5;
    margin: 0 0 20px 0;
    white-space: pre-wrap;
}

.tcn-banner-button {
    display: inline-block;
    background-color: #ffffff;
    color: #0073e6 !important;
    font-size: 16px;
    font-weight: 700;
    padding: 12px 28px;
    border-radius: 30px;
    text-decoration: none;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.15);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background-color 0.2s ease;
}

.tcn-banner-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.2);
    background-color: #f0f7ff;
    color: #005bb5 !important;
    text-decoration: none;
}

/* Feed Layout Styles (Masonry Format using Masonry JS) */
.tcn-feed-container {
    display: block;
    width: 100%;
    max-width: 1200px;
    margin: 20px auto;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    box-sizing: border-box;
}

.tcn-feed-card {
    float: left; /* Fallback for grid float alignment before Masonry loads */
    width: 100%;
    background-color: #ffffff;
    border: 1px solid #e1e8ed;
    border-radius: 12px;
    padding: 18px 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
    break-inside: avoid; /* Prevents card from splitting across columns */
}

.tcn-feed-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
    transform: translateY(-2px);
}

.tcn-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    border-bottom: 1px solid #f5f8fa;
    padding-bottom: 8px;
}

.tcn-card-title {
    font-weight: 700;
    font-size: 16px;
    color: #14171a;
}

.tcn-card-time {
    font-size: 12px;
    color: #657786;
}

.tcn-card-body {
    display: flex;
    flex-direction: column;
}

.tcn-card-text {
    font-size: 15px;
    line-height: 1.5;
    color: #14171a;
    margin: 0 0 12px 0;
    white-space: pre-wrap;
    word-break: break-word;
}

.tcn-card-text a {
    color: #0073e6;
    text-decoration: none;
}

.tcn-card-text a:hover {
    text-decoration: underline;
}

.tcn-card-mms {
    margin-top: 10px;
    border-radius: 8px;
    overflow: hidden;
    max-height: 400px;
    display: flex;
    justify-content: center;
    background-color: #f5f8fa;
    border: 1px solid #e1e8ed;
}

.tcn-card-mms img {
    max-width: 100%;
    height: auto;
    object-fit: contain;
}

.tcn-card-previews {
    margin-top: 12px;
}

.tcn-preview-link {
    text-decoration: none;
    display: block;
}

.tcn-preview-card {
    display: flex;
    flex-direction: column; /* Changed to column layout to fit beautifully inside narrow masonry cards */
    border: 1px solid #e1e8ed;
    border-radius: 10px;
    overflow: hidden;
    background-color: #f5f8fa;
    transition: background-color 0.2s ease, border-color 0.2s ease;
}

.tcn-preview-link:hover .tcn-preview-card {
    background-color: #eef2f5;
    border-color: #cbd5e0;
}

.tcn-preview-image {
    width: 100%;
    height: 150px; /* Fixed height for image area */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border-bottom: 1px solid #e1e8ed; /* Bottom border separator */
    background-color: #eef2f5;
}

.tcn-preview-image img {
    max-width: 100%;
    height: auto;
    display: block;
}

.tcn-preview-info {
    padding: 12px 15px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    min-width: 0;
}

.tcn-preview-title {
    font-weight: 700;
    font-size: 14px;
    color: #14171a;
    margin-bottom: 5px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.tcn-preview-desc {
    font-size: 13px;
    color: #657786;
    margin: 0 0 5px 0;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.tcn-preview-domain {
    font-size: 11px;
    color: #657786;
    text-transform: lowercase;
    font-weight: 500;
}

/* Feed empty/error states */
.tcn-feed-empty, .tcn-feed-error {
    text-align: center;
    padding: 20px;
    color: #657786;
    background-color: #f5f8fa;
    border: 1px dashed #cbd5e0;
    border-radius: 8px;
    font-family: inherit;
    max-width: 600px;
    margin: 20px auto;
}

/* --- 24-Hour Recent Post Highlights & Alert --- */
.tcn-feed-card.tcn-card-recent {
    border-top: 3px solid #ff5722 !important;
    box-shadow: 0 4px 15px rgba(255, 87, 34, 0.12) !important;
}

.tcn-badge-new {
    background-color: #ff5722;
    color: #ffffff !important;
    font-size: 10px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 12px;
    margin-right: 6px;
    vertical-align: middle;
    letter-spacing: 0.5px;
    display: inline-block;
}

.tcn-recent-alert {
    background: #fff8f5;
    border: 1px solid #ffe0b2;
    border-left: 4px solid #ff5722;
    color: #d84315;
    padding: 10px 16px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
    width: 100%;
    box-sizing: border-box;
}

.tcn-recent-alert-icon {
    font-size: 16px;
}


