/* === NexTrack Brand Variables (centralized) === */

.page-title {
    font-size: 2rem;
    margin-bottom: 1rem;
    margin-top: -20px;
    color: var(--text); /* or your accent color */
    text-align: center;
}

.page-container {
    width: 100%;    
    max-width: 1000px;
    margin: -20px auto 0 auto;
    padding: 20px;
    box-sizing: border-box;
    min-height: 85vh;
    display: flex;
    flex-direction: column;
}

/* General Page Styles */
body {
    font-family: Arial, sans-serif;
    margin: 0;
    padding: 0;
    display: flex;
    align-items: center;
    flex-direction: column;
    min-height: 100vh;
    background-color: #121212; /* Dark background */
    color: #e0e0e0; /* Light text for contrast */
}

.copy-success-msg {
    position: fixed;
    top: 20px;
    left: 50%;
    transform: translateX(-50%);
    background: #4caf50;
    color: var(--text);
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    z-index: 9999;
    box-shadow: 0 0 10px rgba(0,0,0,0.3);
}

/* Results Container */
#results-container {
    max-height: 70vh;
    overflow-y: auto;
    flex-direction: column;
}

/* Hide scrollbar */
#results-container::-webkit-scrollbar {
    display: none;
}

#results-container {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

/* Results Table */
#results-table {
    width: 100%;
    border-collapse: collapse;
}

#results-table th,
#results-table td {
    padding: 10px;
    text-align: left;
    border: 1px solid #ddd;
}

/* Professional Search Form Styling */
.search-form {
  display: flex;
  flex-direction: column;
  align-items: stretch; /* 👈 allow full width */
  width: 100%;
}

.input-button-row {
  display: flex;
  width: 100%;
  max-width: 800px;
  gap: 10px;
  margin: 0 auto;
}

.button-row {
    width: 100%;
    max-width: 800px;
    margin: 10px auto 0 auto;
    display: flex;
    justify-content: flex-end;
}

/* Input */
#keywords {
  width: 100% !important; /* 👈 force it no matter what */
  flex: 1;
  box-sizing: border-box;
  padding: 10px 18px;
  font-size: 16px;
  background-color: #2c2c2c;
  color: #e0e0e0;
  border: 1px solid #444;
  border-radius: 6px;
}

#keywords::placeholder {
    color: #999;
}

/* Button */
.custom-submit-btn {
    padding: 10px 20px;
    font-size: 16px;
    border: none;
    border-radius: 4px;
    background-color: var(--brand);
    color: white;
    cursor: pointer;
    transition: background-color 0.3s ease;
    white-space: nowrap;
}

.custom-submit-btn:hover {
    background-color: var(--brand-strong);
}

button:disabled {
    background-color: #444;
    color: #888;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Checkbox Row */
.options-row {
    width: 100%;
    text-align: left;
    margin-top: 10px;
}

.checkbox-label {
    font-size: 14px;
    color: #ccc;
    display: flex;
    align-items: center;
    gap: 5px;
}

.input-wrapper {
    position: relative;
    width: 100%;
    flex: 1;
}

#ai-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    z-index: 9999;
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-radius: 4px;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    max-height: 250px;
    overflow-y: auto;
    display: none;
    transition: all 0.2s ease-in-out;
}

#ai-suggestions.show {
    display: block;
}

/* Info Message */
.info-message {
    font-size: 14px;
    color: #aaa;
    background-color: #222;
    padding: 10px;
    border-radius: 4px;
    margin-top: 10px;
    width: 100%;
}

.info-link {
    color: var(--brand);
    text-decoration: underline;
    font-weight: 500;
}

.paid-notice {
    background-color: #222;
    color: #ffcc00;
    padding: 12px 16px;    
    margin-bottom: 5px;
    border-radius: 6px;
    text-align: center;
    font-size: 15px;
    border: 1px solid #444;
}

.carousel-track-warning {
    margin-top: 1rem;
    padding: 12px;
    border-radius: 10px;
    background-color: #2a2a2a;
    color: #ffc107;
    text-align: center;
    font-size: 0.95rem;
    border: 1px solid #555;
    line-height: 1.4;
}

.carousel-track-warning a.upgrade-link {
    color: var(--brand);
    font-weight: bold;
    text-decoration: underline;
}

/* Suggestions Dropdown */
#suggestions {
    display: block;
    visibility: hidden;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background-color: #1e1e1e;
    border: 1px solid #333;
    border-radius: 4px;
    z-index: 9999;
    box-shadow: 0 8px 16px rgba(0, 0, 0, 0.4);
    max-height: 250px;
    overflow-y: auto;
    margin-top: 5px;    
    opacity: 0;
    transition: opacity 0.2s ease-in-out;
}

#suggestions.show {
    visibility: visible;
    opacity: 1;
}

.suggestion-item.loading {
    font-style: italic;
    color: #999;
    background-color: transparent;
    cursor: default;
}

.suggestion-item.no-results {
    font-style: italic;
    color: #777;
    cursor: default;
}

.suggestion-item.error {
    color: #e74c3c;
    font-style: italic;
    cursor: default;
}

/* Individual suggestion item */
.suggestion-item {
    padding: 10px 12px;
    cursor: pointer;
    color: #e0e0e0;
    font-size: 14px;
    border-bottom: 1px solid #2c2c2c;
    transition: background-color 0.2s ease;
}

/* Last item without bottom border */
.suggestion-item:last-child {
    border-bottom: none;
}

/* Hover and active states */
.suggestion-item:hover,
.suggestion-item.active {
    background-color: rgba(var(--brand-rgb), 0.15);
    color: var(--brand);
}

/* Scrollbar for suggestions */
#suggestions::-webkit-scrollbar {
    width: 6px;
}

#suggestions::-webkit-scrollbar-thumb {
    background-color: #555;
    border-radius: 4px;
}

#suggestions::-webkit-scrollbar-track {
    background-color: #1e1e1e;
}

/* Highlighted Table Row (optional feature) */
.active-row {
    font-weight: bold;
}

/* Tooltip */
.tooltip-container {
    position: relative;
    display: inline-block;
    margin-left: 8px;
    color: var(--brand);
    cursor: help;
    font-weight: bold;
    z-index: 9900; /* Ensure it's above nearby content */
}

.tooltip-container .tooltip-text {
    visibility: hidden;
    width: 280px;
    background-color: #2c2c2c;
    color: #e0e0e0;
    text-align: left;
    border-radius: 6px;
    padding: 10px;
    position: absolute;
    z-index: 9901; /* Highest layer */
    top: 125%; /* Show BELOW instead of above */
    left: 50%;
    transform: translateX(-50%);
    opacity: 0;
    transition: opacity 0.3s;
    font-size: 13px;
    line-height: 1.4;
    box-shadow: 0 0 10px rgba(0,0,0,0.4);
}

/* Tooltip arrow (pointing UP now since tooltip is below) */
.tooltip-container .tooltip-text::after {
    content: '';
    position: absolute;
    bottom: 100%;
    left: 50%;
    margin-left: -6px;
    border-width: 6px;
    border-style: solid;
    border-color: transparent transparent #2c2c2c transparent;
}

.tooltip-container:hover .tooltip-text {
    visibility: visible;
    opacity: 1;
}

#tracks-search-name {
    font-size: 24px;
    color: var(--brand);
    margin-top: 25px;
    margin-bottom: 25px;
    text-align: center;
}

#loading-indicator {
    display: none;
    font-size: 18px;
    font-weight: 500;
    color: var(--brand);
    background-color: #1e1e1e;
    padding: 15px 25px;
    border-radius: 8px;
    margin: 30px auto;
    text-align: center;
    box-shadow: 0 0 10px rgba(var(--brand-rgb), 0.2);
    animation: pulse 1.2s infinite ease-in-out;
    max-width: 300px;
}

.ai-playlist-title {
  font-size: 20px;
  font-weight: bold;
  color: var(--brand);
  text-align: center;
  margin: 15px 0 15px;
  position: relative;
  text-transform: uppercase;
  letter-spacing: 1px;
  border-bottom: 1px solid #444;
  padding-bottom: 8px;
}

.playlist-history-list {  
  margin-bottom: 5px;    
}

.load-more-btn {
    padding: 10px 20px;
    font-size: 16px;
    background-color: #333;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
}

.load-more-btn:hover {
    background-color: var(--brand-strong);
}

.upgrade-link {
    display: inline-block;
    margin-top: 6px;
    color: #ffd369;
    font-weight: bold;
    text-decoration: underline;
}

.upgrade-link:hover {
    text-decoration: none;
}

/* Simple animation to draw attention */
@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    50% { transform: scale(1.05); opacity: 1; }
    100% { transform: scale(1); opacity: 0.8; }
}

@media (max-width: 600px) {

  .ai-playlist-title {
    font-size: 16px;
    margin: 24px 0 12px;
    letter-spacing: 0.5px;
  }

  .input-button-row {
    flex-direction: column;
    gap: 10px;
  }

  #keywords {
    width: 100%;
  }

.input-group-wrapper {
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

.custom-submit-btn {
    width: 100%;
    padding: 12px;
    font-size: 16px;
    text-align: center;
}

input#keywords {
    width: 100%;
    padding: 12px;
    font-size: 16px;
}
}

