/* custom.css */

/* Styling for the main heading */
.main-heading {
  font-size: 2.5rem;
  color: #ffffff;
  text-align: center;
  margin-bottom: 20px;
}

/* Disclaimer Box Styling */
.disclaimer-box {
  background-color: #ffeeba; /* Light yellow background */
  color: #856404; /* Dark yellow text */
  border: 1px solid #ffeeba;
  padding: 15px;
  border-radius: 5px;
  margin-bottom: 20px;
  text-align: center;
}

/* File Upload Form Styling */
.file-upload-form {
  background-color: #f8f9fa; /* Light gray background */
  color: #000000;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
  margin-bottom: 20px;
}

.file-upload-label {
  font-weight: bold;
  color: #000000;
}

.file-input {
  border: 1px solid #000000;
  padding: 8px;
  border-radius: 4px;
  margin-top: 10px;
}

/* Upload Button Styling */
.upload-button {
  background-color: #007bff;
  color: #fff;
  font-weight: bold;
  padding: 10px 20px;
  border-radius: 5px;
  transition: background-color 0.3s ease;
  margin-top: 15px;
}

.upload-button:hover {
  background-color: #0056b3;
}

/* Message Box Styling */
.message-box {
  background-color: #e0f7fa; /* Light cyan background */
  color: #006064; /* Dark cyan text */
  border: 1px solid #b2ebf2; /* Border color */
  padding: 15px;
  border-radius: 5px;
  margin-top: 20px;
  text-align: center;
}

/* File Preview Heading */
.file-preview-heading {
  font-size: 1.5rem;
  color: #ffffff;
  margin-top: 30px;
  margin-bottom: 15px;
  text-align: left;
}

/* Column Names Styling */
.column-names {
  font-size: 1rem;
  color: #ffffff;
  margin-bottom: 10px;
}

/* File Preview Table Styling */
.file-preview-table {
  width: 100%;
  margin-top: 10px;
  border-collapse: collapse;
}

.file-preview-table th, .file-preview-table td {
  padding: 10px;
  text-align: left;
}

.file-preview-table th {
  background-color: #007bff; /* Blue background */
  color: #f1f1f1; /* White text */
}

.file-preview-table td {
  background-color: #f1f1f1; /* Light gray background */
  color: #000000;
}

/* Responsive adjustments */
@media (max-width: 768px) {
  .main-heading {
    font-size: 2rem;
  }
  
  .file-upload-form {
    padding: 15px;
  }

  .file-preview-table th, .file-preview-table td {
    padding: 8px;
  }
}


/*             */

/* Mapping Form Heading */
.mapping-form-heading {
  font-size: 1.5rem;
  color: #ffffff;
  margin-top: 30px;
  margin-bottom: 15px;
  text-align: left;
}

/* Column Mapping Form Styling */
.column-mapping-form {
  background-color: #f8f9fa; /* Light gray background */
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0px 4px 8px rgba(0, 0, 0, 0.1);
  margin-top: 20px;
}

.mapping-label {
  font-weight: bold;
  color: #333;
  display: flex;
  align-items: center;
  margin-bottom: 5px;
}

.info-button {
  font-size: 12px;
  background-color: #ddd;
  color: #333;
  border-radius: 50%;
  padding: 2px 6px;
  margin-left: 8px;
  cursor: pointer;
  position: relative;
}

.info-button::after {
  content: attr(title);
  position: absolute;
  left: 50%;
  top: 130%;
  transform: translateX(-50%);
  white-space: nowrap;
  background-color: #333;
  color: #fff;
  padding: 5px;
  border-radius: 4px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s;
  z-index: 10;
}

.info-button:hover::after {
  opacity: 1;
}

.feature-select {
  border: 1px solid #ddd;
  padding: 8px;
  border-radius: 4px;
  margin-top: 5px;
  width: 100%;
  box-sizing: border-box;
}

/* Analyze Button Styling */
.analyze-button {
  background-color: #28a745; /* Green background */
  color: #fff;
  font-weight: bold;
  padding: 10px 20px;
  border-radius: 5px;
  transition: background-color 0.3s ease;
  margin-top: 15px;
}

.analyze-button:hover {
  background-color: #88da99; /* Darker green on hover */
}

/* Responsive adjustments for form */
@media (max-width: 768px) {
  .mapping-form-heading {
    font-size: 1.25rem;
  }

  .column-mapping-form {
    padding: 15px;
  }

  .feature-select {
    font-size: 0.9rem;
  }
}


/* After Analysis Element Styling */
.analysis-container {
  background-color: white;  /* Ensuring a white background for the analysis section */
  padding: 20px;           /* Adding padding around the content */
  border-radius: 8px;      /* Slightly rounded corners for a modern look */
  margin-top: 20px;        /* Space above the container */
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1); /* Subtle shadow for depth */
}

.portfolio-results {
  display: flex;            /* Flexbox to arrange sections side-by-side */
  justify-content: space-between; /* Evenly space the sections */
  margin-top: 50px;
  margin-bottom: 50px;      /* Space below the portfolio results */
}

.portfolio-section {
  text-align: center;       /* Center align text in each section */
  flex: 1;                  /* Equal width for all sections */
  padding: 10px;            /* Internal padding for each section */
  border-right: 1px solid #ccc; /* Right border for visual separation */
}

.portfolio-section:last-child {
  border-right: none;       /* Remove border from the last section */
}

.portfolio-section h4 {
  margin-bottom: 10px;      /* Space between heading and content */
  font-size: 1.5em;         /* Slightly larger font for headings */
  color: #2f2f2f;              /* Darker color for better readability */
}

.portfolio-section p {
  font-size: 1.9em;         /* Slightly larger font for numbers */
  font-weight: bold;        /* Bold numbers for emphasis */
}

.pnl-value {
  font-size: 1.2em;         /* Slightly larger font for PNL values */
  font-weight: bold;        /* Bold values for emphasis */
}

.portfolio-snippet {
  margin-top: 20px;         /* Space above the portfolio snippet */
  border: 1px solid #ddd;   /* Border around the snippet table */
  border-radius: 5px;       /* Rounded corners for the snippet */
  padding: 10px;            /* Internal padding for the snippet */
  background-color: #f9f9f9; /* Light background for contrast */
}


.portfolio-insights {
  margin-top: 20px;         /* Space above the insights section */
  padding: 10px;            /* Internal padding for insights */
}

.table-striped {
  width: 100%;              /* Full width for the table */
  border-collapse: collapse; /* Collapse borders for cleaner look */
}

.table-striped th, .table-striped td {
  border: 1px solid #ddd;   /* Table cell borders */
  padding: 8px;             /* Padding inside cells */
  text-align: left;         /* Left-align text in cells */
  color: black;
}

.table-striped tr:nth-child(even) {
  background-color: #f2f2f2; /* Alternate row background color */
}

.table-striped tr:hover {
  background-color: #ddd;   /* Row highlight on hover */
}

.table-striped th {
  padding-top: 12px;        /* Padding above table headers */
  padding-bottom: 12px;     /* Padding below table headers */
  background-color: #4CAF50; /* Header background color */
  color: white;             /* Header text color */
}




/* the current insights value styles */
.portfolio-results {
  width: 100%;
  box-sizing: border-box; /* Ensure padding and border are included in the width */
}

.portfolio-section {
  text-align: center; /* Center-align text */
  padding: 10px;
}

.portfolio-section h4 {
  margin-bottom: 5px; /* Space between heading and value */
}

.portfolio-section p {
  font-size: 1.4em; /* Make the font size smaller */
  margin: 0; /* Remove default margin */
}

.pnl-value {
  font-weight: bold;
  font-size: 1.4em; /* Make the font size smaller */
}

.portfolio-section p.sub {
  font-size: 1.2em; /* Smaller font size for sub-values, if needed */
}

.main-container {
  background-color: #f5f5f5;
  flex:1;
  margin: 20px auto;  /* Auto centers the box with a small top/bottom margin */
  box-sizing:content-box;  /* Ensures padding is included in the width */
  padding: 20px;
  border: 1px solid #ddd; /* Border to match market-summary */
  border-radius: 10px; /* Rounded corners to match market-summary */
  box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1); /* Subtle 3D effect */
  width: 95%;
  height: auto;
  z-index: 1; /* Lower value than the overlay */
  position: relative; /* Necessary to position .overlay within */
}




/* description slider */



/* Overlay styling */
.overlay {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: rgba(34, 42, 49, 0.8);
  color: white;
  display: none; /* Initially hidden */
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 20px;
  transition: opacity 0.5s ease;
  z-index: 10000; /* Ensure it is above the interactive plot */
  position: absolute; /* Position within main container */


}

.overlay-content {
  max-width: 80%;
}

.open-overlay-btn {
  margin-top: 10px;
  background-color: #28a745;
  color: white;
  border: none;
  padding: 10px 20px;
  cursor: pointer;
  font-weight: bold;
  border-radius: 5px;
}

.open-overlay-btn:hover {
  background-color: #28a745;
}

/* Overlay Active State */
.overlay.show {
  display: flex;
  opacity: 1;
}





/* short position table css */

/* Container styling */
.unique-container {
  max-width: 800px;
  margin: 30px auto;
  font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
  color: #2d3436;
  background-color: #f5f6fa;
  padding: 20px;
  border-radius: 8px;
  box-shadow: 0px 4px 10px rgba(0, 0, 0, 0.1);
}

/* Message styling */
.unique-message {
  background-color: #dff9fb;
  border-left: 5px solid #00a36a;
  padding: 15px;
  margin-bottom: 20px;
  font-size: 1rem;
  line-height: 1.6;
  border-radius: 5px;
}

/* Table wrapper */
.unique-table-wrapper {
  overflow-x: auto;
  margin-top: 10px;
  border-radius: 5px;
}

/* Table styling */
.unique-data-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #ffffff;
  border-radius: 5px;
  overflow: hidden;
  font-size: 0.95rem;
  color: #2f3640;
}

.unique-data-table th,
.unique-data-table td {
  padding: 12px;
  text-align: left;
  border: 1px solid #dcdde1;
}

.unique-data-table th {
  background-color: #00a36a;
  color: white;
  font-weight: bold;
  text-transform: uppercase;
}

.unique-data-table tr:nth-child(even) {
  background-color: #f1f2f6;
}

.unique-data-table tr:hover {
  background-color: #d1d8e0;
  cursor: default;
}



/* column mapping */

.mapping-container {
  display: flex; /* Use flexbox to place items side by side */
  justify-content: space-between;
  padding: 40px;
  width: 100%;
  position: relative;
  background-color: transparent; /* Add a solid background color */
}

.predefined-columns,
.user-columns {
  width: 78%; /* Adjust the width to fit both columns side by side */
  padding: 10px;
  background-color: rgb(240, 240, 240); /* Light background for these sections */
  border-radius: 10px;
}

.user-columns-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); /* Use auto-fit to adjust the columns */
  gap: 10px;
  /* grid-column-gap: 10px;
  grid-row-gap: 5px; */
} 


.draggable-item {
  cursor: grab;
  background-color: #38d430;
  text-align: center;
  color: #000000;
  border-radius: 5px;
  margin: 5px;
  padding: 10px;
  word-wrap: break-word;
  transition: background-color 0.3s;
}

.droppable-item {
  cursor: pointer;
  text-align: center;
  color: #000000;
  background-color: #00b9e5;
  border-radius: 5px;
  margin: 10px;
  padding: 10px;
  transition: background-color 0.3s;
}

.droppable-item[data-mapped="true"] {
  background-color: orange;
}

.draggable-item[data-mapped="true"] {
  background-color: orange;
}

.draggable-item:hover {
  background-color: #9bf198; /* Darker green on hover */
}







/* Portfolio metrices section */


/* Portfolio Report Styles */
.portfolio-report {
  max-width: calc(100% - 0.5rem) !important; /* Leaves space proportional to parent */
  margin: 0.5rem 0.5rem; /* Centers with border-like space */
  padding: 0.5rem; /* Inner spacing */
  box-sizing: border-box; /* Ensures padding doesn't affect width calculation */
  color: #2c3e50 !important; /* Dark text for table */
}


.metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
  margin-bottom: 1rem;
  color: #2c3e50 !important; /* Dark text for table */

}

.metric-card {
  background: #fff;
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  border-left: 6px solid;
  color: #2c3e50 !important; /* Dark text for table */

}

.metric-card.positive { border-color: #4CAF50; background: #d1efde; }
.metric-card.warning { border-color: #FFC107;background: #ebe7b7; }
.metric-card.negative { border-color: #F44336;background: #edc5c5; }

.sector-box {
  background: #fff;
  padding: 1rem;
  border-radius: 10px;
  margin-bottom: 1rem;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  color: #2c3e50 !important;
  max-height: 300px; /* Limit height */
  overflow-y: auto; /* Enable scrolling */
}

.sector-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
  color: #2c3e50 !important;
}

.sector-table th, .sector-table td {
  padding: 8px; /* Compact rows */
  text-align: left;
  border-bottom: 1px solid #eee;
  color: #2c3e50 !important;
}

.sector-box::-webkit-scrollbar {
  width: 12px; /* Thin scrollbar */
}

.sector-box::-webkit-scrollbar-thumb {
  background-color: #9b9b9b; /* Scrollbar styling */
  border-radius: 10px;
}

.sector-box::-webkit-scrollbar-thumb:hover {
  background-color: #626262;
}


.sector-emoji {
  display: inline-block; /* Ensure the emoji behaves inline */
  margin-right: 0.5rem; /* Add spacing between emoji and sector name */
  vertical-align: middle; /* Aligns emoji with the text baseline */
}

.sector-name {
  display: inline-block; /* Ensure the sector name behaves inline */
  color: #2c3e50 !important; /* Dark text for table */
  margin-right: 0.3rem; /* Spacing between name and emoji */
  vertical-align: middle; /* Aligns emoji with the text baseline */

}



.sector-table tr:hover {
  background: #f9f9f9;
}

.insights-box {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 1rem;
  color: #2c3e50 !important; /* Dark text for table */

}

.insight-section {
  background: #fff;
  padding: 1rem;
  border-radius: 10px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  color: #2c3e50 !important; /* Dark text for table */

}

.insight-item , .recommendation-item{
  padding: 0.8rem;
  margin: 0.5rem 0;
  border-radius: 6px;
  display: flex;
  align-items: center;
  gap: 1rem;
  color: #2c3e50 !important; /* Force dark text for insights */


}

.insight-positive { background: #c6f2d9; }
.insight-warning { background: #ebe7b7; }
.insight-negative { background: #edc5c5; }




/* ------------------------------------------------------------------------------------------------------------------------ */





/* PORTFOLIO SLIDER */

.slider-container {
  position: relative;
  overflow: hidden;
  width: 100%;
  margin: 20px 0;
}

.plot-slide {
  position: absolute;
  width: 100%;
  opacity: 0;
  transition: opacity 0.5s ease;
  pointer-events: none;
}

.plot-slide.active {
  position: relative;
  opacity: 1;
  pointer-events: all;
  z-index: 1;
}

.slider-btn {
  position: absolute;
  top: 350px; /* Set a fixed distance from the top */
  color: #2c3e50; /* Modern dark tone or use your theme color */
  font-size: 36px; /* Adjust for clear visibility */
  border: none;
  background: none; /* No background */
  cursor: pointer;
  z-index: 1000;
  margin: 0 10px;
  padding: 0; /* Keep it minimal */
  transition: color 0.3s ease, transform 0.3s ease; /* Smooth hover effect */
}


.slider-btn:hover {
  color: #3498db; /* Highlight color on hover */
}

.slider-btn:focus {
  outline: none; /* Removes default focus outline */
}


.slider-btn.prev {
  left: -8px;
}

.slider-btn.next {
  right: -8px;
}



/* ------------------------------------------------------------------------------------------------------------------------ */



/* POTRTFOLIO REPLACEMENTS */
/* Ultra Modern Luxury Design */
.mp-container {
  max-width: 1400px;
  margin: 2rem auto;
  padding: 3rem;
  background: rgba(255, 255, 255, 0.95);
  border-radius: 24px;
  box-shadow: 
    0 25px 50px -12px rgba(0, 0, 0, 0.08),
    inset 0 1px 1px rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  font-family: 'Inter', -apple-system, sans-serif;
  position: relative;
  overflow: hidden;
}

.mp-container::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 24px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(255, 255, 255, 0));
  -webkit-mask: 
    linear-gradient(#fff 0 0) content-box, 
    linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  pointer-events: none;
}

.mp-header h1 {
  font-size: 2.75rem;
  text-align: center;
  margin-bottom: 3rem;
  color: #1a1a1a !important;
  font-weight: 700;
  letter-spacing: -0.5px;
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  position: relative;
}

.mp-header h1::after {
  content: '';
  display: block;
  width: 80px;
  height: 4px;
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
  margin: 1rem auto 0;
  border-radius: 2px;
}

/* Luxury Card Design */
.mp-metrics {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 1.5rem;
  margin-bottom: 1rem;
  perspective: 1000px;
}

.mp-metric {
  background: rgba(255, 255, 255, 0.92);
  padding: 1.5rem;
  border-radius: 24px 8px 24px 8px;
  min-height: 100px;       /* down from 160+ */
  height: auto;
  justify-content: center; /* Centers content vertically */
  box-shadow: 
    12px 12px 24px rgba(0, 0, 0, 0.06),
    -6px -6px 12px rgba(255, 255, 255, 0.4),
    inset 2px 2px 4px rgba(255, 255, 255, 0.3);
  transition: all 0.6s cubic-bezier(0.22, 1, 0.36, 1);
  position: relative;
  overflow: hidden;
  border: none;
  transform-style: preserve-3d;
  clip-path: polygon(
    0% 0%,
    100% 0%,
    100% calc(100% - 20px),
    calc(100% - 20px) 100%,
    0% 100%
  );
}

.mp-metric::before {
  content: '';
  position: absolute;
  top: 0;
  right: 0;
  width: 40%;
  height: 100%;
  background: linear-gradient(135deg, 
    rgba(255,255,255,0.3) 0%, 
    rgba(255,255,255,0) 100%);
  transform: skewX(-15deg) translateX(30%);
  transition: all 0.8s ease;
}

.mp-metric::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: -2px;
  width: 60px;
  height: 60px;
  /* background: linear-gradient(135deg, #4f46e5, #7c3aed); */
  clip-path: polygon(0 0, 100% 0, 0 100%);
  z-index: 0;
  opacity: 0.8;
}

.mp-metric:hover {
  transform: translateY(-8px) rotateX(5deg) rotateY(-2deg);
  box-shadow: 
    16px 16px 32px rgba(0, 0, 0, 0.1),
    -8px -8px 16px rgba(255, 255, 255, 0.5),
    inset 4px 4px 8px rgba(255, 255, 255, 0.4);
  border-radius: 16px 12px 16px 12px;
}

.mp-metric:hover::before {
  transform: skewX(-15deg) translateX(10%);
}


/* Content Positioning */
.mp-metric > * {
  position: relative;
  z-index: 2;
  overflow-wrap: break-word;
  word-break: break-word;
}


/* Optional floating elements */
.mp-metric .metric-decoration {
  position: absolute;
  width: 80px;
  height: 80px;
  border-radius: 50%;
  background: radial-gradient(circle, 
    rgba(255,255,255,0.4) 0%, 
    rgba(255,255,255,0) 70%);
  filter: blur(8px);
  z-index: 1;
}

.mp-metric .metric-decoration:nth-child(1) {
  top: -30px;
  right: -30px;
}

.mp-metric .metric-decoration:nth-child(2) {
  bottom: -20px;
  left: -20px;
  width: 60px;
  height: 60px;
}

.mp-metric.positive {
  background: #ccffd5;
  border-left: 4px solid #2fc354;

}
.mp-metric.neutral {
  background: #ffffcc;
  border-left: 4px solid #e7ef0d;

}
.mp-metric.negative {
  background: #fbcbcb;
  border-left: 4px solid #e14436;

}


.mp-metric.positive::before {
  background: linear-gradient(to bottom, #10b913, #88dd75);
}

.mp-metric.neutral::before {
  background: linear-gradient(to bottom, #f59e0b, #fbdd7d);
}

.mp-metric.negative::before {
  background: linear-gradient(to bottom, #ef4444, #ff9595);
}


.mp-metric-label {
  font-size: clamp(0.6rem, 1.2vw, 0.9rem);
  font-weight: 600;
  color: #64748b !important;
  margin-bottom: 0.25rem;
  display: block;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.mp-metric-value {
  font-size: clamp(1rem, 3vw, 1.8rem);
  line-height: 1.2; /* Slightly taller line height */
  word-break: break-word; /* Prevent horizontal overflow */
  font-weight: 700;
  color: #1f2937 !important;
  line-height: 1;
  font-feature-settings: "tnum";
  font-variant-numeric: tabular-nums;
  background: linear-gradient(90deg, #1f2937, #4b5563);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
}




/* Ultra Premium Table Styling */
.mp-holdings h2 {
  font-size: 1.75rem;
  margin-bottom: 2rem;
  color: #1f2937 !important;
  font-weight: 600;
  position: relative;
  display: inline-block;
}

.mp-holdings h2::after {
  content: '';
  position: absolute;
  bottom: -8px;
  left: 0;
  width: 50px;
  height: 3px;
  background: linear-gradient(90deg, #4f46e5, #7c3aed);
  border-radius: 3px;
}

.mp-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 
    0 10px 25px rgba(0, 0, 0, 0.05),
    inset 0 1px 1px rgba(255, 255, 255, 0.5);
  border: 1px solid rgba(255, 255, 255, 0.3);
}

.mp-table thead {
  background: linear-gradient(90deg, #f8fafc, #f1f5f9);
}

.mp-table th {
  padding: 1.25rem 2rem;
  text-align: left;
  color: #4b5563 !important;
  font-weight: 600;
  border-bottom: 1px solid rgba(0, 0, 0, 0.05);
  position: relative;
}

.mp-table th:not(:last-child)::after {
  content: '';
  position: absolute;
  right: 0;
  top: 25%;
  height: 50%;
  width: 1px;
  background: rgba(0, 0, 0, 0.05);
}

.mp-table td {
  padding: 1.25rem 2rem;
  color: #374151 !important;
  border-bottom: 1px solid rgba(0, 0, 0, 0.03);
  transition: all 0.2s ease;
}

.mp-table tr:last-child td {
  border-bottom: none;
}

.mp-table tr:hover td {
  background: rgba(79, 70, 229, 0.03);
}

.mp-table tr:hover td:first-child {
  border-top-left-radius: 8px;
  border-bottom-left-radius: 8px;
}

.mp-table tr:hover td:last-child {
  border-top-right-radius: 8px;
  border-bottom-right-radius: 8px;
}

/* Add subtle animation to table rows */
@keyframes fadeInRow {
  from { opacity: 0.8; transform: translateY(2px); }
  to { opacity: 1; transform: translateY(0); }
}

.mp-table tbody tr {
  animation: fadeInRow 0.3s ease forwards;
}





/* Dropdown System -------------------------------------*/
.dropdown-toggle {
  position: absolute;
  right: 1.5rem;
  top: 50%;
  transform: translateY(-50%);
  cursor: pointer;
  color: #3b82f6 !important;
  background: none;
  border: none;
  padding: 0;
  
  /* New Beautiful Styling */
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  backdrop-filter: blur(4px);
  background-color: rgba(255, 255, 255, 0.7);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.1);
}

.dropdown-toggle:hover {
  color: #2563eb !important;
  background-color: rgba(255, 255, 255, 0.9);
  transform: translateY(-50%) scale(1.1);
  box-shadow: 0 4px 8px rgba(0, 0, 0, 0.15);
}

.dropdown-toggle:active {
  transform: translateY(-50%) scale(0.95);
}

.dropdown-toggle::after {
  content: "⌄";
  font-size: 1.2em;
  transition: transform 0.3s ease;
  display: inline-block;
}

.dropdown-toggle:hover::after {
  transform: translateY(1px);
}

/* Animation when dropdown is active */
.dropdown-toggle.active {
  color: #1e40af !important;
}

.dropdown-toggle.active::after {
  transform: rotate(180deg) translateY(-1px);
}

/* Optional: Add a subtle pulse animation */
@keyframes subtlePulse {
  0% { transform: translateY(-50%) scale(1); }
  50% { transform: translateY(-50%) scale(1.05); }
  100% { transform: translateY(-50%) scale(1); }
}

.dropdown-toggle {
  animation: subtlePulse 4s infinite;
}

.replacement-dropdown {
  display: none;
  position: absolute;
  top: 10px;
  left: 100%;
  z-index: 999;
  max-height: 200px;
  overflow-y: auto;
  
  /* Ultra Premium Styling */
  min-width: 220px;
  background: rgba(255, 255, 255, 0.98);
  backdrop-filter: blur(20px);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 14px;
  box-shadow: 
    0 15px 30px rgba(0, 0, 0, 0.15),
    0 8px 16px rgba(0, 0, 0, 0.08),
    inset 0 1px 1px rgba(255, 255, 255, 0.2);
  padding: 6px 0;
  transform-origin: top left;
  animation: slideFadeIn 0.25s cubic-bezier(0.2, 0, 0.1, 1) forwards;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

.replacement-dropdown option {
  padding: 12px 24px;
  font-size: 14px;
  font-weight: 450;
  color: #1a1a1a;
  cursor: pointer;
  transition: all 0.25s cubic-bezier(0.2, 0, 0.1, 1);
  position: relative;
  letter-spacing: 0.02em;
  border-left: 3px solid transparent;
}

.replacement-dropdown option:hover {
  background: linear-gradient(90deg, rgba(99, 102, 241, 0.08) 0%, transparent 100%);
  color: #4f46e5;
  border-left: 3px solid #4f46e5;
  padding-left: 28px;
  transform: none;
}

.replacement-dropdown option:checked {
  background: linear-gradient(90deg, rgba(79, 70, 229, 0.12) 0%, transparent 100%);
  font-weight: 500;
  color: #4f46e5;
  border-left: 3px solid #4f46e5;
}

/* Premium Scrollbar */
.replacement-dropdown::-webkit-scrollbar {
  width: 8px;
}

.replacement-dropdown::-webkit-scrollbar-track {
  background: rgba(0, 0, 0, 0.03);
  border-radius: 4px;
  margin: 6px 0;
}

.replacement-dropdown::-webkit-scrollbar-thumb {
  background: linear-gradient(to bottom, #8b5cf6, #6366f1);
  border-radius: 4px;
  border: 2px solid rgba(255, 255, 255, 0.3);
}

.replacement-dropdown::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(to bottom, #7c3aed, #4f46e5);
}

/* Sophisticated Animation */
@keyframes slideFadeIn {
  0% {
    opacity: 0;
    transform: translateY(-8px) scale(0.98);
    filter: blur(2px);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
    filter: blur(0);
  }
}

/* Hover effect on parent */
td[style*="cursor: pointer"]:hover .symbol-text {
  color: #4f46e5;
  transition: color 0.2s ease;
}

/* Add subtle glow when dropdown is visible */
.replacement-dropdown {
  box-shadow: 
    0 15px 30px rgba(0, 0, 0, 0.15),
    0 8px 16px rgba(0, 0, 0, 0.08),
    inset 0 1px 1px rgba(255, 255, 255, 0.2),
    0 0 0 1px rgba(99, 102, 241, 0.1);
}

/* Add subtle gradient border */
.replacement-dropdown {
  position: relative;
}

.replacement-dropdown::before {
  content: '';
  position: absolute;
  inset: 0;
  border-radius: 14px;
  padding: 1px;
  background: linear-gradient(135deg, rgba(139, 92, 246, 0.3), rgba(99, 102, 241, 0.1));
  
  -webkit-mask-image: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: exclude;
  
  mask-image: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  
  pointer-events: none;
}






.build-portfolio-button {
  display: inline-block;
  padding: 12px 24px;
  background-color: #4CAF50;
  color: white;
  text-decoration: none;
  font-size: 18px;
  border-radius: 8px;
  margin: 20px 0;
}
.build-portfolio-button:hover {
  background-color: #45a049;
}





.mp-reset-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: background 0.4s ease-in-out, box-shadow 0.3s ease-in-out;
  color: white;
  border: none;
  padding: 0.8rem 1.8rem;
  border-radius: 12px;
  font-size: 1rem;
  font-weight: 600;
  cursor: pointer;
  box-shadow: 
    0 4px 6px rgba(0, 0, 0, 0.1),
    0 1px 3px rgba(0, 0, 0, 0.08);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  overflow: hidden;
  z-index: 1;
}



/* Default background */
.mp-reset-btn.default {
  background: linear-gradient(135deg, #3cffd5 0%, #4A00E0 100%);
}

/* Background when Actual-Date is selected */
.mp-reset-btn.actual {
  background: linear-gradient(135deg, #ff0560 0%, #ff623a 100%);
}




/* .mp-reset-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: -1;
} */

.mp-reset-btn:hover {
  transform: translateY(-2px);
  box-shadow: 
    0 10px 15px rgba(0, 0, 0, 0.1),
    0 4px 6px rgba(0, 0, 0, 0.05);
}

.mp-reset-btn:hover::before {
  opacity: 1;
}

.mp-reset-btn:active {
  transform: translateY(0);
  box-shadow: 
    0 2px 4px rgba(0, 0, 0, 0.1),
    inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* .mp-reset-btn:focus {
  outline: none;
  box-shadow: 
    0 0 0 3px rgba(1, 1, 3, 0.5),
    0 4px 6px rgba(0, 0, 0, 0.1);
} */

/* Optional: Add an icon */
.mp-reset-btn::after {
  content: '↻';
  display: inline-block;
  font-size: 1.1em;
  transition: transform 0.3s ease;
}

.mp-reset-btn:hover::after {
  transform: rotate(90deg);
}

/* Subtle pulse animation */
@keyframes subtlePulse {
  0% { transform: scale(1); }
  50% { transform: scale(1.02); }
  100% { transform: scale(1); }
}

.mp-reset-btn {
  animation: subtlePulse 4s infinite;
}

/* ------------------------------------------------------------------------------------------------------------------------ */


/* own portfolio builder */

.buy-btn {
  transition: transform 0.2s, background-color 0.2s;
}
.buy-btn:hover {
  transform: scale(1.05);
  background-color: #198754 !important;
  color: white;
}
/* ------------------------------------------------------------------------------------------------------------------------ */

/* table in own portfolio builder */

.table-responsive {
    border-radius: 18px;
    overflow: hidden;
    box-shadow: 
        0 12px 32px rgba(0, 0, 0, 0.1),
        0 2px 6px rgba(0, 0, 0, 0.05),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
    background: #fff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
    position: relative;
}

.table-responsive::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 18px;
    padding: 1px;
    background: linear-gradient(135deg, rgba(255,255,255,0.4), rgba(255,255,255,0));
    -webkit-mask-image: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: exclude;
    
    mask-image: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

table.custom-port-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-family: 'Segoe UI', 'Roboto Mono', 'Courier New', monospace;
    font-size: 15px;
    font-weight: 500;
    color: #2d3748;
}

table.custom-port-table thead {
    background: linear-gradient(135deg, #0062ff, #00aaff);
    color: #fff;
    text-transform: uppercase;
    font-weight: 500;
    letter-spacing: 0.05em;
    font-size: 0.85em;
}


/* base thead style is handled by these modifier classes */
table.custom-port-table thead.default {
  background: linear-gradient(135deg, #3cffd5 0%, #4A00E0 100%);
  color: #fff;
}

table.custom-port-table thead.actual {
  /* when “Actual” is selected, use a different gradient */
  background: linear-gradient(135deg, #ff0560 0%, #fc861f 100%);
  color: #fff;
}

table.custom-port-table th {
    padding: 18px 16px;
    text-align: left;
    position: relative;
}

table.custom-port-table th:not(:last-child)::after {
    content: '';
    position: absolute;
    right: 0;
    top: 20%;
    height: 60%;
    width: 1px;
    background: rgba(255, 255, 255, 0.2);
}

table.custom-port-table td {
    padding: 16px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.04);
    transition: all 0.25s cubic-bezier(0.2, 0, 0.1, 1);
}

table.custom-port-table tbody tr {
    transition: all 0.3s ease;
}

table.custom-port-table tbody tr:hover {
    background-color: rgba(79, 70, 229, 0.03);
    transform: translateX(2px);
}

table.custom-port-table tbody tr:last-child td {
    border-bottom: none;
}

table.custom-port-table tbody tr:nth-child(even) {
    background-color: rgba(249, 250, 251, 0.6);
}

table.custom-port-table tbody tr:hover td {
    background: rgba(245, 243, 255, 0.7);
}

table.custom-port-table td button {
    border: none;
    border-radius: 8px;
    background: linear-gradient(135deg, #ef4444, #dc2626);
    color: white;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 
        0 2px 4px rgba(220, 38, 38, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
    position: relative;
    overflow: hidden;
}

table.custom-port-table td button::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    opacity: 0;
    transition: opacity 0.3s ease;
}

table.custom-port-table td button:hover {
    transform: translateY(-1px);
    box-shadow: 
        0 4px 8px rgba(220, 38, 38, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

table.custom-port-table td button:hover::before {
    opacity: 1;
}

table.custom-port-table td button:active {
    transform: translateY(0);
    box-shadow: 
        0 1px 2px rgba(220, 38, 38, 0.2),
        inset 0 1px 2px rgba(0, 0, 0, 0.1);
}

/* Add subtle highlight to first column */
table.custom-port-table td:first-child {
    font-weight: 500;
    color: #1e40af;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    table.custom-port-table {
        font-size: 14px;
    }
    
    table.custom-port-table th, 
    table.custom-port-table td {
        padding: 12px 8px;
    }
}




/* download and save portfilio buttons */
/* === Cosmic Button Group === */
.cosmic-btn-group {
    display: flex;
    gap: 1.2rem;
    justify-content: flex-end;
}

/* === Base Button === */
.cosmic-btn {
    position: relative;
    padding: 1rem 2rem;
    border: none;
    border-radius: 12px 4px 16px 4px; /* Asymmetrical edges */
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.25, 0.8, 0.25, 1);
    overflow: hidden;
    display: flex;
    align-items: center;
    gap: 0.8rem;
    z-index: 1;
    box-shadow: 
        0 8px 20px rgba(0, 0, 0, 0.2),
        inset 0 1px 1px rgba(255, 255, 255, 0.3);
    clip-path: polygon(
        0% 0%,
        100% 0%,
        100% calc(100% - 10px),
        calc(100% - 10px) 100%,
        0% 100%
    );
    transform: skewX(-5deg); /* Dynamic tilt */
}

/* === Electric Color Schemes === */
.cosmic-save {
    background: linear-gradient(135deg, #39bc4f 0%, #02720d 100%);
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

.cosmic-download {
    background: linear-gradient(135deg, #1d7efe 0%, #2200ff 100%);
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.3);
}

/* === Neon Pulse Animation === */
.cosmic-pulse {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle at center,
        rgba(255, 255, 255, 0.8) 0%,
        rgba(255, 255, 255, 0) 70%
    );
    opacity: 0;
    z-index: -1;
    animation: pulse 3s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 0; transform: scale(0.95); }
    50% { opacity: 0.4; transform: scale(1.05); }
}

/* === Hover Effects (Next-Level) === */
.cosmic-btn:hover {
    transform: skewX(-5deg) translateY(-5px) scale(1.05);
    box-shadow: 
        0 12px 30px rgba(0, 0, 0, 0.3),
        inset 0 1px 1px rgba(255, 255, 255, 0.4);
    filter: brightness(1.1);
}

.cosmic-btn:hover .cosmic-pulse {
    animation: pulse-fast 1.5s infinite;
}

@keyframes pulse-fast {
    0%, 100% { opacity: 0; transform: scale(0.98); }
    50% { opacity: 0.6; transform: scale(1.1); }
}

/* === Icon Animation === */
.cosmic-icon {
    transition: all 0.4s ease;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.3));
}

.cosmic-save:hover .cosmic-icon {
    transform: rotate(10deg) scale(1.2);
    animation: glow-blue 1.5s infinite;
}

.cosmic-download:hover .cosmic-icon {
    transform: translateY(-5px) scale(1.2);
    animation: glow-orange 1.5s infinite;
}

@keyframes glow-blue {
    0%, 100% { text-shadow: 0 0 10px #00FFFF; }
    50% { text-shadow: 0 0 20px #00FFFF; }
}

@keyframes glow-orange {
    0%, 100% { text-shadow: 0 0 10px #FF8A00; }
    50% { text-shadow: 0 0 20px #FF8A00; }
}

/* === Click Effect === */
.cosmic-btn:active {
    transform: skewX(-5deg) translateY(2px);
    box-shadow: 
        0 4px 10px rgba(0, 0, 0, 0.2),
        inset 0 2px 4px rgba(0, 0, 0, 0.2);
    filter: brightness(0.9);
}

/* === Focus State (Accessible) === */
.cosmic-btn:focus {
    outline: none;
    box-shadow: 
        0 0 0 3px rgba(255, 255, 255, 0.6),
        0 8px 20px rgba(0, 0, 0, 0.3);
}



/* serch result css for own portfolio creation */
#searchResults .stock-card {
  background: #fdfdfd;
  border: 1px solid #dee2e6;
  box-shadow: 0 2px 6px rgba(0,0,0,0.05);
  border-radius: 12px;
  padding: 1rem 1.2rem;
  transition: box-shadow 0.3s ease;
}

#searchResults .stock-card:hover {
  box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}

#searchResults strong {
  font-size: 1.1rem;
  color: #2c3e50;
}

#searchResults .form-control,
#searchResults .form-select {
  border-radius: 8px;
  font-size: 0.95rem;
  padding: 6px 10px;
  border: 1px solid #ced4da;
}

#searchResults .btn-outline-success {
  border-radius: 8px;
  font-weight: 500;
  transition: background-color 0.2s ease;
}

#searchResults .btn-outline-success:hover {
  background-color: #28a745;
  color: white;
}

.stock-info {
  font-size: 0.95rem;
  color: #34495e;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.stock-info .metric {
  font-weight: 500;
  color: #2c3e50;
}



/* -------------------------- */
/* switch button for replacements */
.mode-switch-container {
  display: flex;
  justify-content: center;
  padding: 20px;
}

.mode-switch {
  display: flex;
  position: relative;
  width: 460px; /* Adjusted width */
  height: 58px; /* Adjusted height */
  background: rgba(255, 255, 255, 0.08);
  border-radius: 50px 30px; /* Asymmetrical shape */
  padding: 6px;
  box-shadow: 
    0 8px 20px rgba(0, 0, 0, 0.15),
    inset 0 2px 4px rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  overflow: hidden;
}

.switch-option {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  z-index: 2;
  cursor: pointer;
  transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
  padding: 0 20px;
}

.switch-text {
  color: rgba(7, 7, 7, 0.7);
  font-size: 16px; /* Slightly larger */
  font-weight: 500;
  letter-spacing: 0.3px;
  transition: all 0.4s ease;
  white-space: nowrap;
  padding: 0 8px;
  line-height: normal;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 100%; /* Ensures full height */
}

input[type="radio"] {
  display: none;
}

input[type="radio"]:checked + .switch-option .switch-text {
  color: #fff;
  font-weight: 600;
}

.switch-glider {
  position: absolute;
  top: 6px;
  left: 6px;
  width: calc(50% - 6px);
  height: calc(100% - 12px);
  background: linear-gradient(135deg, #3cffd5 0%, #4A00E0 100%);
  border-radius: 40px 20px; /* Asymmetrical shape */
  transition: all 0.6s cubic-bezier(0.83, 0, 0.17, 1);
  box-shadow: 
    0 6px 18px rgba(90, 103, 216, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.2);
  z-index: 1;
}

#btnActual:checked ~ .switch-glider {
  transform: translateX(100%);
  background: linear-gradient(135deg, #ff0560 0%, #ff623a 100%);
  box-shadow: 
    0 6px 18px rgba(229, 62, 62, 0.4),
    inset 0 1px 1px rgba(255, 255, 255, 0.2);
}

/* Hover effects */
.switch-option:hover .switch-text {
  transform: translateY(-1px);
  color: rgba(7, 7, 7, 0.9);
  font-weight: bolder;
}

.switch-option:active .switch-text {
  transform: translateY(1px);
}

/* Active state animation */
input[type="radio"]:checked + .switch-option .switch-text {
  animation: textPop 0.4s cubic-bezier(0.22, 0.61, 0.36, 1);
}

@keyframes textPop {
  0% { transform: scale(1); }
  50% { transform: scale(1.08); }
  100% { transform: scale(1); }
}

/* Container hover effect */
.mode-switch:hover {
  border-color: rgba(255, 255, 255, 0.2);
  box-shadow: 
    0 10px 25px rgba(0, 0, 0, 0.2),
    inset 0 2px 4px rgba(255, 255, 255, 0.1);
}

/* Optional: Add a subtle divider between options */
.switch-option:first-child::after {
  content: '';
  position: absolute;
  right: 0;
  top: 50%;
  transform: translateY(-50%);
  height: 60%;
  width: 1px;
  background: rgba(255, 255, 255, 0.1);
}
