/**
 * TCT Ticker Cloud Styles
 */

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

.ticker-cloud-container {
    position: relative;
    border: 1px solid #ddd;
    border-radius: 4px;
    background: #fff;
    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: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.ticker-cloud-header h3 {
    margin: 0;
    color: #333;
}

.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: #0099cc; 
    font-weight: bold;
}

.jqcloud-word.w9 { 
    font-size: 500%; 
    color: #0099cc; 
    font-weight: bold;
}

.jqcloud-word.w8 { 
    font-size: 450%; 
    color: #0099cc; 
}

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

.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;
}

/* 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;
    }
}