/* Dashboard Page Styles (renamed from company-events.css) */

/* AI Analysis Cards */
.ai-analysis-card {
    transition: transform 0.2s ease;
}

.ai-analysis-card:hover {
    transform: translateY(-2px);
}

/* Clickable Analysis Card Hover Effect */
.analysis-card-hover {
    transition: transform 0.2s ease-in-out, box-shadow 0.2s ease-in-out;
    cursor: pointer;
}

.analysis-card-hover:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15) !important;
}

/* Link styling for clickable cards */
a .analysis-card-hover:hover {
    text-decoration: none;
}

.ai-analysis-card .card {
    border-left: 4px solid var(--primary-color);
}

.analysis-points { margin: 1rem 0; }
.analysis-point {
    margin-bottom: 0.5rem;
    color: var(--text-primary);
    font-size: 0.9rem;
    line-height: 1.4;
}

/* Price Mover Cards */
.price-mover-card { transition: transform 0.2s ease; }
.price-mover-card:hover { transform: translateY(-2px); }

.price-change {
    font-weight: 600;
    font-size: 1.1rem;
}

.current-price {
    font-weight: 500;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.price-info { text-align: right; }

/* Card Hover Effects */
.card { transition: box-shadow 0.2s ease, transform 0.2s ease; }
.card:hover { box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important; }

/* Badge Styles */
.badge { font-size: 0.75rem; padding: 0.4em 0.6em; }

/* Responsive Design */
@media (max-width: 768px) {
    .price-info { text-align: left; margin-top: 1rem; }
    .col-md-4.text-md-end { text-align: left !important; }
    .sentiment-indicator { display: none; }
}

/* Animation for cards */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.ai-analysis-card,
.price-mover-card { animation: fadeInUp 0.5s ease forwards; }

.ai-analysis-card:nth-child(2) { animation-delay: 0.1s; }
.ai-analysis-card:nth-child(3) { animation-delay: 0.2s; }
.price-mover-card:nth-child(1) { animation-delay: 0.1s; }
.price-mover-card:nth-child(2) { animation-delay: 0.2s; }
.price-mover-card:nth-child(3) { animation-delay: 0.3s; }
.price-mover-card:nth-child(4) { animation-delay: 0.4s; }
.price-mover-card:nth-child(5) { animation-delay: 0.5s; }

/* Analysis teaser styles */
.analysis-teaser {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-left: 4px solid var(--primary-color);
    padding: 12px 16px;
    border-radius: 0 8px 8px 0;
    margin: 12px 0;
}

.analysis-teaser p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.5;
    color: #495057;
    font-style: italic;
}

.analysis-content .positive {
    color: #155724; background: #d4edda; padding: 2px 6px; border-radius: 4px; font-weight: 600;
}
.analysis-content .negative {
    color: #721c24; background: #f8d7da; padding: 2px 6px; border-radius: 4px; font-weight: 600;
}
.analysis-content .neutral {
    color: #0c5460; background: #d1ecf1; padding: 2px 6px; border-radius: 4px; font-weight: 600;
}

/* Weekly Alerts Table Styles */
.weekly-alerts-table {
    font-size: 0.9rem;
    min-width: 800px;
}

/* Ensure table-responsive works properly */
.table-responsive {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive table {
    margin-bottom: 0;
}

.weekly-alerts-table th {
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: #495057;
    border-bottom: 2px solid #dee2e6;
    padding: 12px 8px;
}

.weekly-alert-row {
    transition: background-color 0.2s ease;
}

.weekly-alert-row:hover {
    background-color: rgba(0, 123, 255, 0.05);
}

.clickable-row {
    cursor: pointer;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.clickable-row:hover {
    background-color: rgba(0, 123, 255, 0.08) !important;
    transform: translateY(-1px);
}

.company-info .company-name {
    font-size: 0.95rem;
    color: #495057;
    font-weight: 600;
}

.company-info .company-ticker {
    font-size: 0.75rem;
    color: #6c757d;
    text-transform: uppercase;
    font-weight: 500;
}

.week-badge {
    font-size: 0.75rem;
    padding: 0.4em 0.6em;
    font-weight: 500;
}

.sentiment-badge {
    font-size: 0.75rem;
    padding: 0.4em 0.6em;
    font-weight: 500;
}

.sentiment-badge i {
    font-size: 0.7rem;
    margin-right: 2px;
}

.price-change-percent {
    font-weight: 600;
    font-size: 0.9rem;
}

.price-change-percent i {
    font-size: 0.8rem;
    margin-right: 3px;
}

.tokens-display {
    font-size: 0.85rem;
    color: #495057;
    font-weight: 500;
}

.view-analysis-btn {
    font-size: 0.8rem;
    padding: 0.375rem 0.5rem;
    border-width: 1px;
}

.view-analysis-btn:hover {
    transform: translateY(-1px);
    transition: transform 0.2s ease;
}

/* Responsive table adjustments */
@media (max-width: 768px) {
    .weekly-alerts-table {
        font-size: 0.8rem;
    }
    
    .weekly-alerts-table th,
    .weekly-alerts-table td {
        padding: 8px 4px;
    }
    
    /* Hide tokens column on mobile */
    .weekly-alerts-table th:nth-child(7),
    .weekly-alerts-table td:nth-child(7) {
        display: none;
    }
}

@media (max-width: 576px) {
    /* Hide price columns on small mobile, keep only company, week, sentiment, change and actions */
    .weekly-alerts-table th:nth-child(4),
    .weekly-alerts-table td:nth-child(4),
    .weekly-alerts-table th:nth-child(5),
    .weekly-alerts-table td:nth-child(5) {
        display: none;
    }
}

/* Premium Lock Overlay */
.premium-lock-overlay {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 100;
    text-align: center;
}

.premium-lock-box {
    background: #fff;
    border: 1px solid #ffc107;
    border-radius: 0.5rem;
    padding: 1.5rem;
    box-shadow: 0 1rem 3rem rgba(0, 0, 0, 0.175);
    max-width: 400px;
}

@media (max-width: 576px) {
    .premium-lock-overlay {
        left: 24px;
        right: 24px;
        transform: translateY(-50%);
        width: auto;
    }
    
    .premium-lock-box {
        max-width: none;
        width: 100%;
    }
}

/* Custom Tabs Styling - GpwAlert colors */
.nav-tabs .nav-link {
    color: var(--text-secondary);
    border: 1px solid transparent;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.nav-tabs .nav-link:hover {
    color: var(--primary-color);
    border-color: transparent;
    border-bottom-color: var(--primary-color);
}

.nav-tabs .nav-link.active {
    color: var(--primary-color);
    background-color: var(--background-secondary);
    border-color: var(--border-color) var(--border-color) var(--background-secondary);
    border-bottom: 2px solid var(--primary-color);
    font-weight: 600;
}

/* Company Description Styles */
.company-description h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-top: 1.25rem;
    margin-bottom: 0.75rem;
}

.company-description h4:first-child {
    margin-top: 0;
}

.company-description p {
    margin-bottom: 1rem;
    line-height: 1.6;
}

.company-description ul {
    margin-bottom: 1rem;
    padding-left: 1.25rem;
}

.company-description li {
    margin-bottom: 0.5rem;
    line-height: 1.5;
}

.company-description strong {
    font-weight: 600;
}
