/* Common styling used across multiple pages */

/* Body background */
html, body {
  background-color: #fff !important;
  height: 100%;
  margin: 0;
  padding: 0;
}


/* Container */
.container {
	width: 1024px;
	padding: 2em;
}

/* Table styling */
th {
     cursor: pointer;
     color: black;
     text-decoration: none;
}

tr:hover { 
    background-color: #ddd; 
}

.selected {
   background-color: #ddd;
}

/* Loading spinner */
.loader {
  border: 5px solid #f3f3f3;
  border-top: 5px solid #09b1ed;
  border-radius: 50%;
  width: 32px;
  height: 32px;
  animation: spin 1s linear infinite;
}

@keyframes spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Bold text styling */
.bold-blue {
	font-weight: bold;
	color: #0277BD;
}

/* Modal styling */
.modal-body p {
    word-wrap: break-word;
}

/* Checkmark animation styling - Legacy, now using sidenav-status */
.checkmark-container {
  display: none;
}

.checkmark-box {
  display: flex;
  align-items: center;
  background-color: #00b300;
  color: #fff;
  padding: 10px;
  border-radius: 5px;
}

.checkmark {
  width: 20px;
  height: 20px;
  border: 2px solid #fff;
  border-radius: 50%;
  margin-right: 10px;
  transition: transform 1.3s ease-in-out;
}

.checkmark::before {
  content: '\2713';
  display: block;
  position: absolute;
  top: 50%;
  left: 19%;
  transform: translate(-50%, -50%);
  color: #fff;
  font-size: 14px;
  line-height: 1;
  font-weight: bold;
  transition: color 0.3s ease-in-out;
}

.checkmark-container.hidden {
  opacity: 0;
}

/* Modal styling */
#actionDetailsModal {
  position: fixed;
  z-index: 1050;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: none;
  overflow: auto;
  justify-content: center;
  align-items: center;
}

.modal-content {
  background-color: #fff;
  padding: 20px;
  border-radius: 5px;
}

/* Tabs common styling */
.tab {
  overflow: hidden;
  border: 1px solid #ccc;
  background-color: #f1f1f1;
}

.tab button {
  background-color: inherit;
  float: left;
  border: none;
  outline: none;
  cursor: pointer;
  padding: 14px 16px;
  transition: 0.3s;
}

.tab button:hover {
  background-color: #ddd;
}

.tab button.active {
  background-color: #ccc;
}

.tabcontent {
  display: none;
  padding: 6px 12px;
  border: 1px solid #ccc;
  border-top: none;
}

/* Custom dropdown styling */
.custom-dropdown {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid #ced4da;
    background-color: #fff;
    font-size: 16px;
    color: #495057;
    appearance: none;
    background-image: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" width="24" height="24"><path fill="%236c757d" d="M7 10l5 5 5-5z"></path></svg>');
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 18px;
    cursor: pointer;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.custom-dropdown:hover {
    border-color: #80bdff;
}

.custom-dropdown:focus {
    border-color: #007bff;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 123, 255, 0.5);
}

.custom-dropdown option {
    background: white;
    color: #333;
    font-size: 16px;
    padding: 10px;
}

/* Spinner animation */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* Tooltip styling */
.custom-tooltip {
  position: absolute;
  background: #333;
  color: #fff;
  padding: 6px 10px;
  font-size: 13px;
  border-radius: 4px;
  white-space: pre-wrap;
  z-index: 10000;
  pointer-events: none;
  max-width: 300px;
  box-shadow: 0 2px 6px rgba(0,0,0,0.3);
}

/* No select styling for tables */
.noselect-table {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
}

.noselect-table * {
  user-select: none;
  -webkit-user-select: none;
  -moz-user-select: none;
  -ms-user-select: none;
  outline: none !important;
}

.noselect-table tr,
.noselect-table td,
.noselect-table th {
  background-color: transparent !important;
}

.noselect-table tr:hover,
.noselect-table tr:active {
  background-color: transparent !important;
}

/* Highlight animation */
.highlight {
  animation: flashGreen 0.5s ease;
}

@keyframes flashGreen {
  from { background-color: #d1e7dd; }
  to { background-color: transparent; }
}

/* Text formatting */
.text-danger {
    color: red;
}

/* --- Enhanced Light Tabs for DipSkip --- */
.nav-tabs.tab {
  border-bottom: 1px solid #d0d7de;
  background-color: #f1f1f1;
  padding: 0 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.nav-tabs.tab .nav-link {
  color: #444;
  border: none;
  border-radius: 8px 8px 0 0;
  padding: 10px 18px;
  background-color: transparent;
  font-weight: 500;
  font-size: 15px;
  transition: all 0.25s ease-in-out;
  position: relative;
}

.nav-tabs.tab .nav-link i {
  margin-right: 6px;
  opacity: 0.85;
}

.nav-tabs.tab .nav-link:hover {
  color: #2464eb;
  background-color: #e7efff;
  box-shadow: inset 0 -2px 0 #2464eb;
}

.nav-tabs.tab .nav-link.active {
  color: #2464eb;
  background-color: #ffffff;
  box-shadow: inset 0 -3px 0 #2464eb;
  font-weight: 600;
}

.nav-tabs.tab .nav-link.active::after {
  content: "";
  position: absolute;
  left: 12%;
  right: 12%;
  bottom: 0;
  height: 2px;
  background: linear-gradient(90deg, #2464eb, #69b3f7);
  border-radius: 2px;
  box-shadow: 0 0 6px rgba(36, 100, 235, 0.3);
}

.tabcontent {
  background-color: #ffffff;
  color: #212529;
  padding: 15px;
  border: 1px solid #d0d7de;
  border-top: none;
  animation: tabFadeIn 0.25s ease;
}

@keyframes tabFadeIn {
  from { opacity: 0; transform: translateY(6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.fade-in {
  animation: tabFadeIn 0.25s ease;
}

.nav-tabs.tab .nav-link i {
  font-weight: 900;
  letter-spacing: -0.5px;
  opacity: 0.95;
  font-size: 1.1em;
  transform: scale(1.05);
}

/* Trading Environment Indicator in Header */
.trading-env-indicator {
    display: flex;
    align-items: center;
    padding: 10px 20px !important;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
}

.trading-env-indicator.paper-env {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(245, 158, 11, 0.1));
    color: #d97706;
    border: 1px solid rgba(245, 158, 11, 0.3);
}

.trading-env-indicator.paper-env:hover {
    background: linear-gradient(135deg, rgba(245, 158, 11, 0.3), rgba(245, 158, 11, 0.2));
    border-color: rgba(245, 158, 11, 0.5);
}

.trading-env-indicator.live-env {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.2), rgba(34, 197, 94, 0.1));
    color: #16a34a;
    border: 1px solid rgba(34, 197, 94, 0.3);
}

.trading-env-indicator.live-env:hover {
    background: linear-gradient(135deg, rgba(34, 197, 94, 0.3), rgba(34, 197, 94, 0.2));
    border-color: rgba(34, 197, 94, 0.5);
}
