/* Watchlists Page Styles */

/* Warning Banner */
.warning-banner {
    background-color: #E3F2FD;
    border-radius: 8px;
    padding: 1.25rem 1.5rem;
    margin-bottom: 2rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.warning-text {
    color: #1F2937;
    font-size: 0.875rem;
    margin: 0;
    flex: 1;
}

.warning-buttons {
    display: flex;
    gap: 0.75rem;
    flex-shrink: 0;
}

.btn-login,
.btn-signup {
    background-color: #EDB809;
    color: white;
    padding: 0.5rem 1.5rem;
    border-radius: 6px;
    border: none;
    font-weight: 500;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
}

.btn-login:hover,
.btn-signup:hover {
    background-color: #D4A408;
}

/* Empty State */
.empty-state {
    background-color: #E3F2FD;
    border-radius: 8px;
    padding: 2rem;
    text-align: left;
    margin-top: 1.5rem;
}

.empty-state p {
    color: #1F2937;
    font-size: 0.875rem;
    margin: 0;
}

.tab-btn {
    transition: all 0.2s ease;
    font-size: 0.875rem;
    padding-bottom: 1rem;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    cursor: pointer;
    color: #6B7280;
    font-weight: 500;
}

.tab-btn:hover {
    color: #1F2937;
}

.tab-btn.active {
    border-bottom: 2px solid #3B82F6;
    color: #1F2937;
    font-weight: 500;
    background: none;
}

/* Table Container */
.table-wrapper {
    border: 1px solid #E5E7EB;
    border-radius: 8px;
    overflow: hidden;
    background-color: #FFFFFF;
}

/* Table Styles */
table {
    border-collapse: collapse;
    border-spacing: 0;
    background-color: #FFFFFF;
    width: 100%;
    border: 1px solid #E5E7EB;
    border-radius: 8px;
}

/* Tab Content Visibility */
.tab-content {
    display: block;
    width: 100%;
}

.tab-content.hidden {
    display: none;
}

thead {
    background-color: #F9FAFB;
}

thead tr {
    border-bottom: 1px solid #E5E7EB;
}

thead tr th {
    position: sticky;
    top: 0;
    background-color: #F9FAFB;
    z-index: 5;
    font-weight: 500;
    font-size: 0.875rem;
    color: #6B7280;
    text-align: left;
    padding: 1rem 1.5rem;
    text-transform: none;
    letter-spacing: 0;
    border: none;
}

thead tr th:first-child {
    padding-left: 1.5rem;
}

tbody tr {
    transition: background-color 0.15s ease;
    background-color: #FFFFFF;
    border: none;
}

tbody tr:hover {
    background-color: #F9FAFB;
}

tbody td {
    padding: 1rem 1.5rem;
    font-size: 0.875rem;
    color: #1F2937;
    border: none;
}

tbody td:first-child {
    font-weight: 500;
    padding-left: 1.5rem;
    color: #1F2937;
}

/* Color coding for positive/negative values - matching Python Streamlit style */
.text-positive {
    color: #28a745;
}

.text-negative {
    color: #dc3545;
}

/* Remove badge classes - not used in Python version */
.bg-positive {
    color: #28a745;
}

.bg-negative {
    color: #dc3545;
}

/* Search Results Dropdown */
#search-results {
    max-height: 400px;
    z-index: 50;
}

.search-result-item {
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    border-bottom: 1px solid #E5E7EB;
    transition: background-color 0.15s ease;
}

.search-result-item:last-child {
    border-bottom: none;
}

.search-result-item:hover {
    background-color: #F9FAFB;
}

.search-result-info {
    flex: 1;
    font-size: 0.9375rem;
}

.search-result-symbol {
    font-weight: 600;
    color: #1F2937;
}

.search-result-name {
    color: #4B5563;
    font-weight: 400;
}

.search-add-btn {
    background-color: #EDB809;
    color: white;
    padding: 0.5rem 2rem;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    font-size: 0.875rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    white-space: nowrap;
    flex-shrink: 0;
}

.search-add-btn:hover {
    background-color: #D4A408;
}

/* Remove Buttons */
.remove-btn {
    background-color: #EDB809;
    color: white;
    padding: 0.75rem 1.5rem;
    border-radius: 0.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
    border: none;
    cursor: pointer;
    width: 100%;
}

.remove-btn:hover {
    background-color: #D4A408;
    transform: translateY(-1px);
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Watchlist Selector Button */
.watchlist-selector-button {
    width: 100%;
    min-width: 240px;
    padding: 0.875rem 1rem;
    background: white;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 0.9375rem;
}

.watchlist-selector-button:hover {
    border-color: #9CA3AF;
}

.watchlist-selector-button:focus {
    outline: none;
    border-color: #6B7280;
    box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.1);
}

.watchlist-selector-text {
    color: #1F2937;
    font-weight: 400;
}

.watchlist-selector-icon {
    width: 20px;
    height: 20px;
    color: #6B7280;
}

/* Watchlist Dropdown */
.watchlist-dropdown {
    position: absolute;
    top: calc(100% + 0.25rem);
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #D1D5DB;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    z-index: 40;
    overflow: hidden;
    min-width: 240px;
}

.watchlist-dropdown-item {
    padding: 1rem 1.25rem;
    cursor: pointer;
    transition: background-color 0.15s ease;
    font-size: 0.9375rem;
    color: #1F2937;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.watchlist-dropdown-item:hover {
    background-color: #F3F4F6;
}

.watchlist-dropdown-divider {
    height: 1px;
    background-color: #E5E7EB;
    margin: 0.25rem 0;
}

.add-new-item {
    color: #1F2937;
}

.add-new-item .add-icon {
    width: 18px;
    height: 18px;
    color: #1F2937;
}

/* Watchlist Input Container */
.watchlist-input-container {
    padding: 1rem;
    border-top: 1px solid #E5E7EB;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.watchlist-name-input {
    width: 100%;
    padding: 0.625rem 0.875rem;
    border: 1px solid #D1D5DB;
    border-radius: 6px;
    font-size: 0.9375rem;
    color: #1F2937;
    background-color: white;
    transition: all 0.2s ease;
}

.watchlist-name-input:focus {
    outline: none;
    border-color: #6B7280;
    box-shadow: 0 0 0 3px rgba(107, 114, 128, 0.1);
}

.watchlist-name-input::placeholder {
    color: #9CA3AF;
}

.watchlist-input-buttons {
    display: flex;
    justify-content: flex-start;
}

.watchlist-create-btn {
    background-color: #EDB809;
    color: white;
    padding: 0.625rem 2.5rem;
    border-radius: 6px;
    border: none;
    font-weight: 600;
    font-size: 0.9375rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.watchlist-create-btn:hover {
    background-color: #D4A408;
}

@media (max-width: 768px) {
    .watchlist-selector-button {
        min-width: 100%;
    }
}

/* Loading State */
.loading-skeleton {
    background: linear-gradient(90deg, #F3F4F6 25%, #E5E7EB 50%, #F3F4F6 75%);
    background-size: 200% 100%;
    animation: loading 1.5s ease-in-out infinite;
    border-radius: 0.25rem;
    height: 1rem;
}

@keyframes loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* Responsive adjustments */
@media (max-width: 768px) {
    table {
        font-size: 0.75rem;
    }

    tbody td,
    thead th {
        padding: 0.5rem;
    }

    .tab-btn {
        font-size: 0.875rem;
    }
}

/* Symbol links */
.symbol-link {
    color: #1F2937;
    font-weight: 600;
    text-decoration: none;
    transition: color 0.15s ease;
}

.symbol-link:hover {
    color: #EDB809;
    text-decoration: underline;
}