/**
 * TCT Watchlist Styles
 */

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

.watchlist-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 15px;
    background: #f9f9f9;
    border: 1px solid #ddd;
    border-radius: 4px;
}

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

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

.watchlist-controls button {
    padding: 6px 12px;
    font-size: 13px;
    border: 1px solid #ddd;
    background: #f7f7f7;
    border-radius: 3px;
    cursor: pointer;
}

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

.watchlist-controls button.primary {
    background: #2271b1;
    color: white;
    border-color: #2271b1;
}

.watchlist-controls button.primary:hover {
    background: #1e5b8a;
}

.watchlist-mainContainer {
    border: 1px solid #ddd;
    border-radius: 4px;
    overflow: hidden;
    background: #fff;
}

.watchlist-table {
    width: 100%;
    border-collapse: collapse;
}

.watchlist-table th,
.watchlist-table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #eee;
}

.watchlist-table th {
    background: #f5f5f5;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #ddd;
}

.watchlist-table tr:hover {
    background: #f9f9f9;
}

.watchlist-table .ticker {
    font-weight: bold;
    color: #2271b1;
}

.watchlist-table .price {
    font-family: 'Courier New', monospace;
    font-weight: 500;
    text-align: right;
}

.watchlist-table .notes {
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.watchlist-table .actions {
    white-space: nowrap;
    text-align: right;
}

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

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

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

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

.watchlist-form {
    padding: 20px;
    background: #f9f9f9;
    border-top: 1px solid #ddd;
    display: none;
}

.watchlist-form.show {
    display: block;
}

.watchlist-form .form-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
    align-items: end;
}

.watchlist-form .form-group {
    flex: 1;
}

.watchlist-form label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #333;
}

.watchlist-form input[type="text"],
.watchlist-form input[type="number"],
.watchlist-form textarea {
    width: 100%;
    padding: 8px 12px;
    border: 1px solid #ddd;
    border-radius: 3px;
    font-size: 14px;
    box-sizing: border-box;
}

.watchlist-form textarea {
    min-height: 60px;
    resize: vertical;
}

.watchlist-form .submit-row {
    text-align: right;
}

.watchlist-form button {
    margin-left: 10px;
    padding: 8px 15px;
    font-size: 14px;
    border: 1px solid #ddd;
    background: #f7f7f7;
    border-radius: 3px;
    cursor: pointer;
}

.watchlist-form button.primary {
    background: #2271b1;
    color: white;
    border-color: #2271b1;
}

.watchlist-form button:hover {
    background: #e7e7e7;
}

.watchlist-form button.primary:hover {
    background: #1e5b8a;
}

.watchlist-empty {
    padding: 40px;
    text-align: center;
    color: #666;
    font-style: italic;
}

.watchlist-stats {
    padding: 15px;
    background: #f0f4f8;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9em;
    color: #666;
}

.watchlist-stats .stat-item {
    display: flex;
    align-items: center;
    gap: 5px;
}

.watchlist-stats .stat-value {
    font-weight: 600;
    color: #333;
}

.price-target {
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.price-target.above {
    color: #00a32a;
}

.price-target.below {
    color: #d63638;
}

.price-target.at {
    color: #ff8c00;
}

.price-indicator {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.price-indicator.above {
    background: #00a32a;
}

.price-indicator.below {
    background: #d63638;
}

.price-indicator.at {
    background: #ff8c00;
}

.ticker-symbol {
    font-family: 'Courier New', monospace;
    font-weight: bold;
    text-transform: uppercase;
}

.tct-loading {
    padding: 40px;
    text-align: center;
    color: #666;
    font-style: italic;
}

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

/* Responsive design */
@media (max-width: 768px) {
    .watchlist-header {
        flex-direction: column;
        gap: 15px;
        align-items: flex-start;
    }
    
    .watchlist-controls {
        flex-wrap: wrap;
        width: 100%;
    }
    
    .watchlist-table {
        font-size: 0.9em;
    }
    
    .watchlist-table th,
    .watchlist-table td {
        padding: 8px 10px;
    }
    
    .watchlist-table .notes {
        max-width: 120px;
    }
    
    .watchlist-form .form-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .watchlist-form .form-group {
        flex: none;
    }
    
    .watchlist-stats {
        flex-direction: column;
        gap: 10px;
        align-items: flex-start;
    }
}

@media (max-width: 480px) {
    .watchlist-table .notes {
        display: none;
    }
    
    .watchlist-table .actions {
        width: 60px;
    }
    
    .watchlist-table .actions button {
        font-size: 10px;
        padding: 3px 6px;
    }
}