/**
 * TCT Ticker Cloud Styles
 */

.tct-ticker-cloud-wrapper {
    margin: 20px 0;
}

.ticker-cloud-container {
    position: relative;
    border: 1px solid rgba(11, 31, 58, 0.12);
    border-radius: 8px;
    background: linear-gradient(135deg, #FFFFFF 0%, #F9FAFB 100%);
    padding: 20px;
    min-height: 300px;
    overflow: hidden;
}

.ticker-cloud-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: rgba(11, 31, 58, 0.04);
    border: 1px solid rgba(11, 31, 58, 0.12);
    border-radius: 8px;
}

.ticker-cloud-header h3 {
    margin: 0;
    color: #0B1F3A;
    font-weight: 600;
}

.ticker-cloud-controls {
    display: flex;
    gap: 10px;
    align-items: center;
}

.ticker-cloud-controls button {
    padding: 5px 10px;
    font-size: 12px;
    border: 1px solid #ddd;
    background: #f7f7f7;
    border-radius: 3px;
    cursor: pointer;
}

.ticker-cloud-controls button:hover {
    background: #e7e7e7;
}

/* jQCloud specific styles */
.jqcloud {
    font-family: "Helvetica", "Arial", sans-serif;
    font-size: 10px;
    line-height: normal;
    overflow: hidden;
    position: relative;
}

.jqcloud-word {
    padding: 0;
    margin: 0;
    outline: 0;
    border: 0;
    display: inline-block;
    text-decoration: none;
    position: absolute;
    white-space: nowrap;
    cursor: pointer;
    transition: all 0.3s ease;
}

.jqcloud-word:hover {
    color: #2271b1 !important;
    transform: scale(1.1);
}

.jqcloud-word.w10 {
    font-size: 550%;
    color: #0B1F3A;
    font-weight: 600;
}

.jqcloud-word.w9 {
    font-size: 500%;
    color: #103B72;
    font-weight: 600;
}

.jqcloud-word.w8 {
    font-size: 450%;
    color: #0B1F3A;
}

.jqcloud-word.w7 {
    font-size: 400%;
    color: #103B72; 
}

.jqcloud-word.w6 { 
    font-size: 350%; 
    color: #339933; 
}

.jqcloud-word.w5 { 
    font-size: 300%; 
    color: #339933; 
}

.jqcloud-word.w4 { 
    font-size: 250%; 
    color: #ff6600; 
}

.jqcloud-word.w3 { 
    font-size: 200%; 
    color: #ff6600; 
}

.jqcloud-word.w2 { 
    font-size: 150%; 
    color: #ff6600; 
}

.jqcloud-word.w1 { 
    font-size: 120%; 
    color: #999999; 
}

/* Custom ticker cloud styles */
.ticker-item {
    display: inline-block;
    margin: 5px;
    padding: 8px 12px;
    background: #f0f4f8;
    border: 1px solid #cbd5e0;
    border-radius: 20px;
    font-weight: 600;
    color: #2d3748;
    text-decoration: none;
    transition: all 0.3s ease;
    cursor: pointer;
}

.ticker-item:hover {
    background: #e2e8f0;
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}

.ticker-item.large {
    font-size: 1.5em;
    padding: 12px 18px;
    background: #2271b1;
    color: white;
}

.ticker-item.medium {
    font-size: 1.2em;
    padding: 10px 15px;
    background: #00a32a;
    color: white;
}

.ticker-item.small {
    font-size: 1em;
    background: #f0f4f8;
    color: #2d3748;
}

.no-data {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 60px 20px;
}

.ticker-cloud-legend {
    margin-top: 20px;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9em;
}

.ticker-cloud-legend h4 {
    margin: 0 0 10px 0;
    color: #333;
}

.legend-item {
    display: inline-block;
    margin-right: 20px;
    margin-bottom: 5px;
}

.legend-color {
    display: inline-block;
    width: 12px;
    height: 12px;
    margin-right: 5px;
    border-radius: 2px;
}

.legend-color.high { background: #0099cc; }
.legend-color.medium { background: #339933; }
.legend-color.low { background: #ff6600; }
.legend-color.minimal { background: #999999; }

.tct-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    height: 200px;
    color: #666;
    font-style: italic;
}

.error {
    padding: 15px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 4px;
    color: #991b1b;
    margin: 10px 0;
    text-align: center;
}

/* Admin ticker cloud management */
.ticker-cloud-admin {
    margin-top: 30px;
}

.ticker-cloud-admin h3 {
    margin-bottom: 15px;
    color: #333;
}

.ticker-form {
    display: flex;
    gap: 10px;
    align-items: end;
    margin-bottom: 20px;
}

.ticker-form input {
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
}

.ticker-form input[type="text"] {
    width: 120px;
}

.ticker-form input[type="number"] {
    width: 80px;
}

.ticker-list {
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
}

.ticker-list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #eee;
}

.ticker-list-item:last-child {
    border-bottom: none;
}

.ticker-list-item:hover {
    background: #f9f9f9;
}

.ticker-info {
    flex: 1;
}

.ticker-symbol {
    font-weight: 600;
    color: #2271b1;
    margin-right: 15px;
}

.ticker-weight {
    color: #666;
    font-size: 0.9em;
}

.ticker-actions button {
    margin-left: 5px;
    padding: 4px 8px;
    font-size: 11px;
    border: 1px solid #ddd;
    background: #f7f7f7;
    border-radius: 3px;
    cursor: pointer;
}

.ticker-actions button:hover {
    background: #e7e7e7;
}

.ticker-actions .delete {
    color: #d63638;
    border-color: #d63638;
}

.ticker-actions .delete:hover {
    background: #fef2f2;
}

/* Status Badge Styles */
.status-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: white;
}

.status-badge.status-pending {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
}

.status-badge.status-covered {
    background: linear-gradient(135deg, #00a32a 0%, #27ae60 100%);
}

.status-badge.status-fading {
    background: linear-gradient(135deg, #f1c40f 0%, #f39c12 100%);
}

.status-badge.status-archived {
    background: linear-gradient(135deg, #95a5a6 0%, #7f8c8d 100%);
}

.status-badge.status-invalidated {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
}

/* Fading Ticker Row Style - 50% Opacity */
tr[data-status="fading"],
.ticker-card[data-status="fading"],
.ticker-item[data-status="fading"] {
    opacity: 0.5;
    transition: opacity 0.3s ease;
}

tr[data-status="fading"]:hover,
.ticker-card[data-status="fading"]:hover {
    opacity: 0.75;
}

/* Invalidated Ticker Row - Greyed */
tr[data-status="invalidated"],
.ticker-card[data-status="invalidated"],
.ticker-item[data-status="invalidated"] {
    background-color: #f5f5f5;
    color: #999;
}

tr[data-status="invalidated"] td {
    color: #999;
}

.invalidated-tooltip {
    cursor: help;
    border-bottom: 1px dotted #999;
}

/* Hot Badge for Top 3 */
.hot-badge {
    display: inline-block;
    padding: 3px 8px;
    background: linear-gradient(135deg, #ff4500 0%, #ff6347 100%);
    color: white;
    font-size: 10px;
    font-weight: 700;
    border-radius: 10px;
    margin-left: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    animation: pulse-hot 2s infinite;
}

@keyframes pulse-hot {
    0%, 100% {
        box-shadow: 0 0 5px rgba(255, 69, 0, 0.5);
    }
    50% {
        box-shadow: 0 0 15px rgba(255, 69, 0, 0.8);
    }
}

/* Ticker Badge in Table */
.ticker-badge {
    display: inline-block;
    font-weight: 700;
    font-size: 15px;
    color: #2271b1;
    letter-spacing: 0.5px;
}

/* Date Badge */
.date-badge {
    font-size: 13px;
    color: #666;
}

/* Responsive design */
@media (max-width: 768px) {
    .ticker-cloud-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }

    .ticker-cloud-controls {
        flex-wrap: wrap;
    }

    .ticker-form {
        flex-direction: column;
        gap: 10px;
        align-items: stretch;
    }

    .ticker-form input {
        width: 100% !important;
    }

    .ticker-list-item {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }

    .ticker-actions {
        width: 100%;
        text-align: right;
    }
}