/* assets/style.css */

/* Import Google Fonts */
@import url('https://fonts.googleapis.com/css2?family=Montserrat:wght@600&display=swap');
@import url("https://fonts.googleapis.com/css2?family=Merriweather:wght@400;700&display=swap");

/* Reset & base */
* { box-sizing: border-box; }
html, body {
  margin: 0; padding: 0;
  background-color: #111;        /* charcoal */
  color: #E0C068;                /* warmer gold */
  font-family: 'Montserrat', sans-serif;
  transition: background 0.3s, color 0.3s;
}


/* Fade‑in container */
.fade-in { animation: fadeIn 1s ease-out forwards; opacity: 0; }
@keyframes fadeIn { to { opacity: 1; } }

/* Navbar tweaks */
.navbar {
  background: linear-gradient(90deg, #1a1a1a, #111);
  padding: .75rem 2rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
}
.brand, .nav-link {
    font-family: 'Montserrat', sans-serif;
    font-weight: 500;
    font-size:  1.2rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    text-align: center;
    margin: 0px 6px;
    color: #FFD700;
    text-decoration: none;
    position: relative;
    transition: color 0.2s ease-in-out;
}

.nav-link:hover,
.brand:hover { color: #FFF !important; }


.nav-link::after {
    content: "";
    position: absolute;
    left: 0; right: 0;
    bottom: -3px;
    height: 2px;
    background-color: #FFD700;
    transform: scaleX(0);
    transform-origin: bottom right;
    transition: transform 0.2s ease-out;
}
.nav-link:hover::after {
    transform: scaleX(1);
    transform-origin: bottom left;
}



/* Cards grid */
.tool-cards {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1rem;
  padding: 2rem 0;
}

/* Individual card */
.tool-card {
  position: relative;
  width: 280px;
  background: #222;
  border: 2px solid #333;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 4px 12px rgba(0,0,0,0.6);
  transition: transform .2s, border-color .2s;
}
.tool-card:hover {
  transform: translateY(-6px);
  border-color: #E0C068;
}

/* Card image or chart placeholder */
.tool-card .card-image {
  width: 100%;
  height: 140px;
  background-size: cover;
  background-position: center;
}
.tool-card .card-body {
  padding: 1rem;
}
.tool-card .card-title {
  font-size: 1.25rem;
  margin-bottom: .5rem;
  color: #E0C068;
}
.tool-card .card-text {
  font-size: .9rem;
  margin-bottom: 1rem;
  color: #CCC;
}

/* Gold button variant */
.gold-button {
  background: #E0C068;
  color: #111;
  border-radius: 6px;
  padding: .6rem 1.2rem;
  font-weight: 600;
  transition: background .2s;
}
.gold-button:hover { background: #CFB659; }

/* Dark‑themed form controls */
.dark-input,
.dark-dropdown .Select-control,
.tabs-container {
  height: 2.5rem;
  align-items: center;               /* vertically center any flex children */
}

.dark-input {
  width: 100%;
  background-color: #222;
  color: #F5F5F5;
  border: 1px solid #E0C068;
  border-radius: 4px;
  padding: 8px;
}
.dark-dropdown .Select-control,
.dark-dropdown .Select-menu-outer {
  background-color: #222 !important;
  color: #F5F5F5 !important;
  border: 1px solid #E0C068 !important;
  border-radius: 4px;
}

/* placeholder text in the closed dropdown */
.dark-dropdown .Select-placeholder {
  color: #F5F5F5 !important;
  opacity: 1 !important;
}

/* the selected value label once you pick something */
.dark-dropdown .Select-value-label {
  color: #F5F5F5 !important;
  opacity: 1 !important;
}

/* each option in the open menu */
.dark-dropdown .Select-option {
  color: #F5F5F5 !important;
  opacity: 1 !important;
}

/* menu background (you already have this, but just in case) */
.dark-dropdown .Select-menu-outer {
  background-color: #222 !important;
}


.dark-slider .rc-slider-rail {
  background-color: #333;
}
.dark-slider .rc-slider-track {
  background-color: #E0C068;
}
.dark-slider .rc-slider-handle {
  border-color: #E0C068;
  background-color: #E0C068;
}


/* 1) slide+fade animation */
@keyframes slideFadeIn {
  from { opacity: 0; transform: translateY(8px); }
  to   { opacity: 1; transform: translateY(0); }
}
.fade-in {
  animation: slideFadeIn 0.8s ease-out forwards;
  opacity: 0;
}

.form-label {
  font-size: 1rem;
  color: #E0C068;
  margin-top: 0.2rem;
  margin-bottom: 3px;
}

/* ==========================================================================
   1) Container
   ========================================================================== */
.tabs-container {
  display: flex !important;
  flex-direction: row !important;
  width: 100% !important;
  margin: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 1px solid #E0C068;
  border-radius: 6px;
  align-items: center;
  position: relative; /* Make the container relative to allow absolute positioning */
  z-index: 1; /* Ensure the tabs stay on top */
}

/* ==========================================================================
   2) Base Tab Styles
   ========================================================================== */
.tabs-container .tab {
  flex: 1 1 0 !important;   /* grow & shrink equally */
  min-width: 0 !important;   /* allow shrinking below intrinsic size */
  overflow: hidden !important;  /* clip the hover BG to this box */
  text-align: center;
  padding: 0.6rem 0 !important;
  margin: 0 !important;
  background: transparent !important;
  color: #E0C068;
  border: none !important;
  font-family: 'Montserrat', sans-serif;
  font-weight: 600;
  position: relative;
  transition: background 0.2s, color 0.2s;
  border-radius: 0 !important;   /* we’ll round only the container, not each tab */
}
.tabs-container .more-dropdown-custom {
  flex: 1 1 0;      /* same as your .tab’s flex shorthand */
  min-width: 0;     /* allow it to shrink below its content width */
  width: 100%;
  display: flex;                /* center label + caret */
  align-items: center;
  justify-content: center;
  padding: 0.6rem 0;            /* match your .tab padding */
  background: transparent;
  border: none !important;
  color: #E0C068;
  transition: background 0.2s, color 0.2s;
  position: relative;
}

.tabs-container .more-dropdown-custom.show .dropdown-toggle {

  animation: tabPop 0.2s ease-out both;
}

/* 3) Restore rounded corners on the first & last “tab” so the container’s radius shows through */
.tabs-container .tab:first-child {
  border-top-left-radius: 6px !important;
  border-bottom-left-radius: 6px !important;
}

/* Remove default focus outlines */
.tabs-container .tab,
.tabs-container .tab--selected {
  outline: none !important;
  box-shadow: none !important;
}

/* ==========================================================================
   3) Hover State
   ========================================================================== */
.tabs-container .tab:not(.tab--selected):hover {
  background: rgba(224, 192, 104, 0.1) !important;
}

/* Underline effect */
.tabs-container .tab::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 25%;
  width: 0;
  height: 3px;
  background: #E0C068;
  transition: width 0.3s ease;
}
.tabs-container .tab:hover::after,
.tabs-container .tab--selected::after {
  width: 50%;
}

/* ==========================================================================
   4) Selected State
   ========================================================================== */
.tabs-container .tab--selected {
  background: #E0C068 !important;
  color: #111 !important;
  animation: tabPop 0.2s ease-out both;
  border-radius: 5px !important;
  scale: 1.05;
}

/* Pop-in animation */
@keyframes tabPop {
  from { transform: translateY(4px); opacity: 0.7; }
  to   { transform: translateY(0);   opacity: 1;   }
}

/* ==========================================================================
   5) MOBILE FIX
   ========================================================================== */
@media (max-width: 576px) {
  /* Force tabs to row layout inside container */
  .tabs-container {
    flex-direction: row !important;
    flex-wrap: nowrap !important;
  }

  /* Force each .tab to take exactly 1/3 of the row */
  .tabs-container .tab .more-dropdown-custom {
    flex: 1 1 33.3333% !important;
    max-width: 33.3333% !important;
    min-width: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    padding: 0.6rem 0.2rem !important;
    font-size: 0.85rem !important; /* Optional: smaller text on mobile */
  }
  .more-dropdown-custom .dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    right: auto !important;
    width: 100vw; /* Full viewport width */
    max-width: 100%; /* Prevent overflow */
    transform: translateY(-10px) scale(0.95); /* Initial position */
    margin-left: -10px; /* Align with the left edge of the screen */
  }

}

/* ==========================================================================
   More Dropdown Styles
   ========================================================================== */
/* wrap your ButtonGroup+Dropdown in this */
.tab-container-with-dropdown {
  position: relative;
  overflow: visible !important;    /* allow the menu to escape */
}

/* Dropdown toggle text & chevron color */
.more-dropdown-custom .dropdown-toggle {
  color: rgba(255, 255, 255, 0.55);
  font-weight: 500;
}

/* On hover, brighten toggle */
.more-dropdown-custom .dropdown-toggle:hover {
  color: rgba(255, 255, 255, 0.75);
}


/* The actual dropdown menu panel */
.more-dropdown-custom .dropdown-menu {
  position: absolute !important;
  top: 100% !important;
  left: 0 !important;
  transform: translateY(-10px) scale(0.95); /* Initial position */
  background-color: #121212e9;
  border: 1px solid #E0C068;
  border-radius: 0.25rem;
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.25);
  padding: 0.5rem 0;
  opacity: 0;
  visibility: hidden;
  z-index: 1000;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
}

.more-dropdown-custom.show .dropdown-menu {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
  transition-delay: 0s;
  animation: dropdownBounce 0.3s ease forwards;
}

/* Menu items */
.more-dropdown-custom .dropdown-item {
  color: #E0C068;
  background-color: transparent;
  padding: 0.6rem 1.2rem;
  transition: background 0.2s, color 0.2s;
  white-space: normal;       /* Allow text wrapping */
  word-wrap: break-word;     /* Break long words if necessary */
  overflow-wrap: break-word; /* Ensure word breaking in all browsers */
  max-width: 100%;           /* Fit text within the container */
  line-height: 1.2;          /* Adjust line spacing for better readability */
}
.more-dropdown-custom .dropdown-item:hover {
  background-color: rgba(224, 192, 104, 0.1);
  color: #fff;
  border-left: 3px solid #E0C068;
}

/* Rotate the built-in caret */
.more-dropdown-custom .dropdown-toggle::after {
  transition: transform 0.3s;
}
.more-dropdown-custom.show .dropdown-toggle::after {
  transform: rotate(180deg);
}

/* Keyframe for a “pop” effect */
@keyframes dropdownAppear {
  0%   { opacity: 0; transform: translateY(-10px) scale(0.95); }
  70%  { transform: translateY(5px) scale(1.02); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes dropdownBounce {
  0% { opacity: 0; transform: translateY(-10px) scale(0.95); }
  60% { transform: translateY(3px) scale(1.02); }
  100% { opacity: 1; transform: translateY(0) scale(1); }
}

/* Fix for the Dropdown Toggle Link */
.more-dropdown-custom .dropdown-toggle::after {
    content: none;
}

.more-dropdown-custom .dropdown-toggle:hover::after {
    content: none;
}

/* Adjust the active state */
.more-dropdown-custom.show .dropdown-toggle {
    color: #FFD700 !important; /* Optional: change color when dropdown is open */
}

/* Caret styling */
.more-dropdown-custom .dropdown-label {
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

/* Rotate the caret when dropdown is open */
.more-dropdown-custom .dropdown-toggle::after {
  display: none;
}

.more-dropdown-custom .dropdown-label .bi-caret-down-fill {
  transition: transform 0.3s ease;
}

.more-dropdown-custom.show .bi-caret-down-fill {
  transform: rotate(180deg);
}



/* ==========================================================================
   Granularity Button Styles
   ========================================================================== */
.granularity-button {
  background-color: #111;
  color: #E0C068;
  margin-right: 5px;
  border: 2px solid #E0C068;
  border-radius: 10px;
  font-weight: 600;
  letter-spacing: 0.5px;
  transition: all 0.25s ease;
  z-index: 5;
}


.granularity-button:hover {
  background-color: rgba(224, 192, 104, 0.2);
  color: #E0C068;
  border: 2px solid #a58a40;
  z-index: 1;
}

.granularity-button.active,
.granularity-button:active,
.granularity-button:focus {
  background-color: #E0C068 !important;
  color: #111 !important;
  border-color: #E0C068 !important;
  z-index: 1;
}


/* ==========================================================================
   Section Divider Line
   ========================================================================== */
.section-divider {
  border: none;
  border-top: 1px solid #E0C068;
  margin: 2rem 0 1rem 0;
  opacity: 0.4;
}


/* ====================================
   Unified Date Picker Styling
   Theme: Dark TradingView Aesthetic with Gold Accents
======================================= */
/* Modern Date Picker Styling */

/* Scope all overrides under this class */

/* Date Picker Container */
.date-picker-container {
  width: 100%;
  display: block;
}

.modern-date-picker {
  width: 100% !important;
  /* ensure the popup calendar isn't clipped */
  overflow: visible;
}

/* Inputs laid out in a row */
.modern-date-picker .DateRangePickerInput {
  display: flex !important;
  justify-content: space-between;
  font-family: 'Montserrat', sans-serif;
  align-items: center;
  width: 100%;
  background-color: #222 !important;
  border: 1px solid #E0C068 !important;
  border-radius: 8px !important;
  box-shadow: 0 3px 6px rgba(0, 0, 0, 0.15) !important;
}

/* Each date field */
.modern-date-picker .DateInput {
  flex: 1;
  width: 100% !important;
  background-color: transparent !important;
}

/* The actual input box */
.modern-date-picker .DateInput_input {
  width: 100% !important;
  background-color: transparent !important;
  border: none !important;
  font-size: 1rem !important;
  color: #fff !important;
  text-align: center !important;
  padding: 8px 10px !important;
  transition: color 0.2s;
}

.modern-date-picker .DateInput_input:hover {
  color: #E0C068 !important;
}
.modern-date-picker .DateInput_input:focus {
  color: #E0C068 !important;
  outline: none !important;
  transform: scale(1.05); /* Slight enlargement */
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* Smooth transition back to normal */
.modern-date-picker .DateInput_input {
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

/* The little arrow between fields */
.modern-date-picker .DateRangePickerInput_arrow {
  color: #E0C068 !important;
  padding: 0 8px !important;
}

/* Calendar popup background */
.modern-date-picker .DayPicker {
  margin-top: 8px !important;
  background-color: #222 !important;
  border: 1px solid #E0C068 !important;
  border-radius: 8px !important;
  box-shadow: 0 6px 20px rgba(0, 0, 0, 0.3) !important;
  overflow: hidden !important;
  z-index: 1000 !important; /* Ensure it appears above other elements */
  position: relative !important; /* Ensure it doesn't get clipped */
}
.modern-date-picker .DayPicker_weekHeader {
  color: #E0C068 !important;
  padding-top: 5px !important;
  padding-bottom: 5px !important;
}
/* Month title */
.modern-date-picker .CalendarMonth_caption {
  color: #b99d57 !important;
  font-weight: 500 !important;
  text-transform: uppercase;
}

/* Calendar table */
.modern-date-picker .CalendarMonth_table {
  margin-top: 18px !important; /* Give more space for the weekday header */
}

/* Weekdays row */
.modern-date-picker .DayPicker_weekHeader {
  color: #E0C068 !important;
  padding-top: 5px !important;
  padding-bottom: 5px !important;
  top: 50px !important; /* Better positioning to avoid overlap */
}


/* Day cells */
.modern-date-picker .CalendarDay {
  background-color: #333 !important;
  border: 1px solid #444 !important;
  color: #fff !important;
  transition: all 0.2s ease;
  border-radius: 0 !important;
  vertical-align: middle !important;
  text-align: center !important;
}

.modern-date-picker .CalendarDay:hover {
  background-color: rgba(224, 192, 104, 0.2) !important;
  border-color: #E0C068 !important;
  color: #E0C068 !important;
}

/* Selected day */
.modern-date-picker .CalendarDay__selected {
  background-color: #E0C068 !important;
  border-color: #E0C068 !important;
  color: #222 !important;
  font-weight: bold !important;
}

/* Span between selected days (if range) */
.modern-date-picker .CalendarDay__selected_span {
  background-color: rgba(224, 192, 104, 0.3) !important;
  border-color: rgba(224, 192, 104, 0.3) !important;
  color: #fff !important;
}

.modern-date-picker .CalendarDay__hovered_span {
  background-color: rgba(224, 192, 104, 0.4) !important;
  border-color: rgba(224, 192, 104, 0.4) !important;
  color: #fff !important;
}

/* Today's date */
.modern-date-picker .CalendarDay__today {
  border: 2px solid rgba(224, 192, 104, 0.8) !important;
  font-weight: bold !important;
}

/* Nav arrows */
.modern-date-picker .DayPickerNavigation_button {
  background-color: #333 !important;
  border: 1px solid #E0C068 !important;
  border-radius: 50% !important;
  color: #E0C068 !important;
  margin-top: 10px !important;
}

.modern-date-picker .DayPickerNavigation_button:hover {
  background-color: rgba(224, 192, 104, 0.2) !important;
}


/* Hide the keyboard shortcuts helper */
.modern-date-picker .DayPickerKeyboardShortcuts_show {
  display: none !important;
}

/* Fix any remaining white background issues */
.modern-date-picker .DateRangePicker_picker__directionLeft {
  background-color: transparent !important;
}
/* Fix for Date Picker input field */
.modern-date-picker .DateRangePicker_picker {
  z-index: 1000 !important; /* Maximize the z-index to be above buttons */
  position: absolute !important; /* Position above other components */
}

.modern-date-picker .CalendarMonthGrid {
  background-color: #222 !important;
}

.modern-date-picker .CalendarMonth {
  background-color: #222 !important;
}

/* Fix date input placeholder color */
.modern-date-picker .DateInput_input::placeholder {
  color: rgba(255, 255, 255, 0.5) !important;
}

/* Fix any white triangle indicators */
.modern-date-picker .DateInput_fang {
  display: none !important;
}


/* ============================================================================
   GAMMA SCREENER DARK THEME STYLING
   ============================================================================ */

/* Dark dropdown styling */
.dark-dropdown .Select-control {
    background-color: #222 !important;
    color: #FFF !important;
    border: 1px solid #E0C068 !important;
}

.dark-dropdown .Select-menu-outer {
    background-color: #222 !important;
    border: 1px solid #E0C068 !important;
}

.dark-dropdown .Select-option {
    background-color: #222 !important;
    color: #FFF !important;
}

.dark-dropdown .Select-option:hover {
    background-color: #333 !important;
    color: #E0C068 !important;
}

.dark-dropdown .Select-value-label {
    color: #FFF !important;
}

/* Dark input styling */
.dark-input {
    background-color: #222 !important;
    color: #FFF !important;
    border: 1px solid #E0C068 !important;
    border-radius: 4px;
}

.dark-input:focus {
    background-color: #222 !important;
    color: #FFF !important;
    border-color: #FFD700 !important;
    box-shadow: 0 0 0 0.2rem rgba(224, 192, 104, 0.25) !important;
}

.dark-input::placeholder {
    color: #888 !important;
}
