/* Root variables for primary theme colors */
:root {
    --primary-blue: rgb(9, 23, 71);
    --primary-purple: #5850EC;
    --gray-50: #f9fafb;
    --gray-500: #6b7280;
}

/* Advanced Settings toggle section */
.advanced-toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin: 20px 0;
    border-top: 1px solid #ddd;
    padding-top: 20px;
}

.advanced-label {
    font-weight: 600;
    font-size: 16px;
    color: #333;
}

/* Main advanced settings container */
#advancedSettingsContainer {
    display: none;
    margin-top: 20px;
}

/* Timeline container */
.timeline-container {
    height: 150px;
    overflow-y: auto;
    background-color: var(--gray-50);
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 24px;
    border: 1px solid #eee;
    display: flex;
    flex-wrap: wrap;
    align-content: flex-start;
    gap: 12px;
}

/* Timeline items */
.timeline-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    border-radius: 8px;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
    flex-shrink: 0;
}

.timeline-item.animation {
    background-color: rgba(9, 23, 71, 0.1);  /* Using primary-blue with opacity */
    color: var(--primary-blue);
    border: 1px solid rgba(9, 23, 71, 0.2);
}

.timeline-item.transition {
    background-color: rgba(88, 80, 236, 0.1);  /* Using primary-purple with opacity */
    /* color: var(--primary-purple); */
    color: var(--primary-blue);
    border: 1px solid rgba(88, 80, 236, 0.2);
}

/* Button grid */
.grid-button {
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

.grid-button.animation {
    background-color: rgba(9, 23, 71, 0.1);
    color: var(--primary-blue);
    border: 1px solid rgba(9, 23, 71, 0.2);
}

.grid-button.transition {
    background-color: rgba(88, 80, 236, 0.1);
    /* color: var(--primary-purple); */
    color: var(--primary-blue);
    border: 1px solid rgba(88, 80, 236, 0.2);
}

.grid-button.animation:hover {
    background-color: rgba(9, 23, 71, 0.15);
}

.grid-button.transition:hover {
    background-color: rgba(88, 80, 236, 0.15);
}

/* Options container */
.options-container {
    height: 150px;
    overflow-y: auto;
    border: 1px solid #eee;
    border-radius: 8px;
    padding: 16px;
    background-color: var(--gray-50);
    margin-bottom: 24px;
}

/* Button grid */
.button-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 12px;
}

.grid-button {
    padding: 10px 16px;
    border: 1px solid #ddd;
    border-radius: 8px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.2s ease;
}

/* 
 .grid-button.animation {
    background-color: #dbeafe;
}

 .grid-button.transition {
    background-color: #f3e8ff;
}

 .grid-button.animation:hover {
    background-color: #bfdbfe;
}

 .grid-button.transition:hover {
    background-color: #e9d5ff;
} 
*/

/* Settings grid */
.settings-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 32px;
    margin-bottom: 24px;
}

.toggle-container,
.dropdown-container {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

/* Switch styles */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: var(--primary-blue);
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Toggle rows */
.toggle-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 0;
    border-bottom: 1px solid #eee;
}

.toggle-row:last-child {
    border-bottom: none;
}

.setting-label {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Dropdown styles */
select {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ddd;
    background-color: white;
    font-size: 14px;
}

/* Pacing selector */
.pacing-container {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.pacing-selector {
    display: flex;
    align-items: center;
    border: 2px solid var(--primary-blue);
    border-radius: 25px;
    overflow: hidden;
}

.pacing-option {
    flex: 1;
    padding: 10px 0;
    background-color: #E1E8EE;
    border: none;
    color: #333;
    font-size: 14px;
    cursor: pointer;
    transition: background-color 0.2s, color 0.2s;
    text-align: center;
    user-select: none;
    outline: none;
}

.pacing-option:not(:first-child) {
    border-left: 1px solid var(--primary-blue);
}

.pacing-option:hover {
    background-color: #D0DDEE;
}

.pacing-option.selected {
    background-color: var(--primary-blue);
    color: white;
}

/* Save button */
.save-button {
    background-color: var(--primary-blue);
    color: white;
    border: none;
    border-radius: 8px;
    padding: 12px 24px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.save-button:hover {
    background-color: #041032;
}

/* Add container styling after save button */
.save-button-container {
    grid-column: 1 / -1; /* Make it span all columns */
    margin-bottom: 24px;  /* Change this from margin-top */
    padding-bottom: 24px; /* Change this from padding-top */
    border-bottom: 1px solid #ddd; /* Change this from border-top */
    width: 100%;
    text-align: right;
}

/* Tooltip styles */
.tooltip-wrapper {
    position: relative;
    display: inline-flex;
    align-items: center;
    margin-left: 8px;
}

.tooltip-trigger {
    color: #6b7280;
    cursor: pointer;  /* Changed from help to pointer */
    font-size: 16px;
}

.tooltip-trigger:hover {
    color: var(--primary-blue);
}

/* 
   In original code, .tooltip-content had pointer-events: none.
   We remove that so you can copy/paste the tooltip text.
*/
.tooltip-content {
    display: none; 
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 8px 12px;
    background-color: #333;
    color: white;
    font-size: 14px;
    border-radius: 6px;
    white-space: normal;
    width: max-content;
    max-width: 250px;
    margin-bottom: 8px;
    z-index: 999999; /* Increased z-index */
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    text-align: center;
    /* pointer-events: none;  <-- REMOVED! */
}

.tooltip-content.show {
    display: block;
}

/* Empty timeline message */
.empty-message {
    color: var(--gray-500);
    font-style: italic;
    width: 100%;
    text-align: center;
    padding: 20px;
}

/* Remove button */
.remove-button {
    background: none;
    border: none;
    cursor: pointer;
    color: currentColor;
    opacity: 0.7;
    padding: 4px;
}

.remove-button:hover {
    opacity: 1;
}

/* Custom scrollbar */
.timeline-container::-webkit-scrollbar,
.options-container::-webkit-scrollbar {
    width: 8px;
}

.timeline-container::-webkit-scrollbar-track,
.options-container::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.timeline-container::-webkit-scrollbar-thumb,
.options-container::-webkit-scrollbar-thumb {
    background: #cfcfcf;
    border-radius: 4px;
}

.timeline-container::-webkit-scrollbar-thumb:hover,
.options-container::-webkit-scrollbar-thumb:hover {
    background: #bfbfbf;
}

/* Toast notifications */
#toastContainer {
    position: fixed;
    top: 20px;
    right: 25px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    z-index: 9999;
}

.toast-message {
    display: flex;
    align-items: center;
    gap: 10px;
    background-color: #4caf50;
    color: #fff;
    padding: 12px 16px;
    font-size: 15px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
}

.toast-message.show {
    opacity: 1;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .settings-grid {
        grid-template-columns: 1fr;
    }
    
    .button-grid {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    }
    
    .timeline-container {
        height: 150px;
    }
    
    .options-container {
        height: 150px;
    }
    
    .tooltip-content {
        max-width: 200px;
        white-space: normal;
    }
}

/* Add this after the root variables section */
.section-title {
    font-weight: bold;
    margin-bottom: 8px;
    margin-top: 8px;
    text-align: left;
    font-size: inherit;  /* This will match the dropdown-header size */
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Force .dropdown-header text color to not appear blue on mobile */
.dropdown-header {
    font-weight: bold;
    margin-bottom: 8px;
    margin-top: 8px;
    text-align: left;
    font-size: 16px;
    color: #333 !important;
    text-decoration: none !important;
    user-select: none;
}

@supports (-webkit-touch-callout: none) {
    .dropdown-header {
      -webkit-text-fill-color: #333 !important;  /* Override WebKit autofill styling */
      color: #333 !important;
    }
  }
  
