/* ===================================
   MAIN STYLES CSS
   Global styles, Bootstrap overrides, and base layout
   =================================== */

/* ===== GLOBAL BASE STYLES ===== */
body,
html {
  background-color: #33424f;
  height: 100%;
  width: 100%;
}

/* ===== BOOTSTRAP OVERRIDES ===== */
.card-body {
  box-shadow: 0 0 9px rgba(0, 0, 0, 0.42);
  background-color: #3e5160;
  margin-top: 0;
}

.btn-outline-light:not(:disabled):not(.disabled).active:focus,
.btn-outline-light:not(:disabled):not(.disabled):active:focus,
.show > .btn-outline-light.dropdown-toggle:focus {
  box-shadow: 0 0 0 0.2rem rgba(248, 249, 250, 0.5);
}

.table {
  box-shadow: 0 10px 16px 0 rgba(0, 0, 0, 0.2),
    0 6px 20px 0 rgba(33, 33, 33, 0.19) !important;
}

.table-hover tbody tr:hover td,
.table-hover tbody tr:hover th {
  background-color: rgb(255, 241, 230);
}

/* ===== GLOBAL LAYOUT ===== */
.main-content-spacing {
  margin-top: 86px;
  margin-left: 16px;
}

nav {
  margin-bottom: 26px;
}

.block-heading {
  margin-top: 40px;
}

/* ===== NAVIGATION STYLES ===== */
.navbar.navbar-light.navbar-expand-md.fixed-top.bg-dark.clean-navbar {
  padding-top: 0;
  padding-right: 0;
  padding-bottom: 0;
  padding-left: 5;
}

.nav-item-spacing {
  padding-right: 4px;
}

.nav-link-custom {
  color: rgba(255, 255, 255, 0.9);
}

/* ===== GLOBAL TABLE STYLES ===== */
thead {
  background-color: #253f47;
  border: 32px;
  font-style: normal;
}

.table thead th {
  width: 167px;
}

/* ===== GLOBAL BUTTON STYLES ===== */
#add-stock-btn,
#add-portfolio-btn {
  border-color: rgb(255, 255, 255);
  color: rgb(255, 255, 255);
  background-color: rgb(38, 166, 154);
}

#close-modal-btn {
  border-color: rgb(255, 255, 255);
  color: rgb(255, 255, 255);
  background-color: rgb(254, 109, 115);
}

#trash-btn {
  border: none;
  background: transparent;
  color: #ff4846;
  outline: none;
  opacity: 0.6;
}

#trash-btn:hover {
  opacity: 1;
}

#cash-btn {
  border: none;
  background: transparent;
  color: #f704c6;
  outline: none;
  opacity: 0.6;
}

#cash-btn:hover {
  opacity: 1;
}

/* ===== GLOBAL FORM STYLES ===== */
#ticker,
#price-at-purchase,
#num-of-shares {
  -webkit-box-shadow: none;
  box-shadow: none;
}

#browsebutton {
  background-color: white;
}

#my-file-selector {
  display: none;
}

/* ===== GLOBAL ALERT STYLES ===== */
.alert-success {
  background-color: #d4edda;
  border-color: #c3e6cb;
  color: #155724;
}

.flash-toast.alert-success {
  background-color: #28a745;
  color: white;
  border: none;
  border-radius: 8px;
  box-shadow: 0 4px 12px rgba(40, 167, 69, 0.3);
  position: fixed;
  top: 20px;
  right: 20px;
  z-index: 9999;
  min-width: 300px;
  animation: slideInRight 0.3s ease-out;
}

.flash-toast.alert-success .btn-close {
  color: white;
  opacity: 0.8;
}

.flash-toast.alert-success i {
  color: white;
}

.alert-danger {
  background-color: #f8d7da;
  border-color: #f5c6cb;
  color: #721c24;
}

/* ===== UTILITY CLASSES ===== */
.hidden-element {
  display: none;
}

.inline-form {
  display: inline;
}

.white-text {
  color: rgb(255, 255, 255);
}

.nowrap-text {
  white-space: nowrap;
}

.w-15 {
  width: 15% !important;
}

.w-20 {
  width: 20% !important;
}

.split {
  display: flex;
  flex-direction: row;
}

.gutter {
  background-color: #eee;
  background-repeat: no-repeat;
  background-position: 50%;
}

.gutter.gutter-horizontal {
  background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAUAAAAeCAYAAADkftS9AAAAIklEQVQoU2M4c+bMfxAGAgYYmwGrIIiDjrELjpo5aiZeMwF+yNnOs5KSvgAAAABJRU5ErkJggg==");
  cursor: col-resize;
}

/* ===== GLOBAL COLOR UTILITIES ===== */
td.num.r {
  color: #ef7156;
}

td.num.g {
  color: #00b35c;
}

.bg-custom-1 {
  background-color: #85144b;
}

.bg-custom-2 {
  background-image: linear-gradient(15deg, #13547a 0%, #80d0c7 100%);
}

/* ===== GLOBAL RESPONSIVE STYLES ===== */
@media (min-width: 768px) {
  #table-card {
    padding: 0 40px 0 40px;
  }
}

@media (min-width: 500px) {
  tbody {
    color: #181818;
  }
}

@media (max-width: 992px) {
  .mobileMenu {
    -webkit-transform: translateX(-100%);
    transform: translateX(-100%);
    position: fixed;
    top: 0px;
    bottom: 0;
    margin: auto;
    left: 0;
    -webkit-transition: all ease 0.25s;
    transition: all ease 0.25s;
  }

  .mobileMenu.open {
    -webkit-transform: translateX(0%);
    transform: translateX(0%);
  }

  .mobileMenu .navbar-nav {
    overflow-y: auto;
  }

  .overlay {
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    right: 0;
    margin: auto;
    background-color: rgba(0, 0, 0, 0.5);
    display: none;
  }

  .overlay.open {
    display: block;
    z-index: 1029;
  }
}

/* ===== ANIMATIONS ===== */
@keyframes slideInRight {
  from {
    transform: translateX(100%);
    opacity: 0;
  }
  to {
    transform: translateX(0);
    opacity: 1;
  }
}
