* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;

  font-family: "Open Sans";
  font-size: 12px;
  color: #1a2237;
}

.title {
  font-size: 44px;
  font-weight: 700;
  margin-bottom: 16x;
}

.app_description {
  font-size: 16px;
  margin: 0;
}

#content {
  clear: both;
  margin-top: 20px;
  background-color: white;
  border: 1px solid #dedede;
  width: 100%;
  min-width: 300px;
}

#logo {
  color: #1a2237;
  margin: 20px 0;
  display: flex;
  flex-direction: row;
  justify-content: space-between;
}

#logo #logo-left {
  display: flex;
}

#logo .link-tms {
  margin-left: 15px;
  padding-top: 35px;
}
#logo .link-tms a {
  color: #1a2237;
  font-weight: bold;
  text-decoration: underline;
}
#logo .logo-tms {
  float: left;
}
#logo .logo-tms img {
  height: 72px;
}

#logo .logo-go4x {
  float: right;
}
h1 {
  font-size: 44px;
  line-height: 53px;
  font-weight: normal;
}
#wrapper {
  max-width: 1200px;
  margin: 0 auto;
  padding-inline: 15px;
}

.link {
  color: #1a2237;
  margin: 6px 17px 30px 1px;
  display: block;
}

.position_form_info {
  margin: 0;
  margin-top: 10px;
  text-align: center;
}

.select_form {
  display: flex;
  flex-direction: row;
  justify-content: center;
  gap: 10px;
}

.select_form .select-container,
.select_form .input-container {
  width: 100%;
}

#add_position {
  border: 1px solid #dedede;
  padding: 20px;
  margin: 20px;
}
#add_position p {
  line-height: 15px;
  padding-right: 10px;
}

#add_position form {
  display: flex;
  align-items: center;
  gap: 10px;
}

.add_position__fields {
  display: flex;
  flex-direction: row;
  gap: 5px;
}

.loadmask {
  z-index: 100;
  position: absolute;
  top: 0;
  left: 0;
  -moz-opacity: 0.5;
  opacity: 0.5;
  filter: alpha(opacity=50);
  background-color: #ccc;
  width: 100%;
  height: 100%;
  zoom: 1;
}
.loadmask-msg {
  z-index: 20001;
  position: absolute;
  top: 0;
  left: 0;
  background: #c3daf9;
}
.loadmask-msg div {
  padding: 5px 10px 5px 25px;
  background: #fbfbfb url("img/loading.gif") no-repeat 5px 5px;
  line-height: 16px;
  border: 1px solid #b7b7b7;
  color: #222;
  font: normal 11px tahoma, arial, helvetica, sans-serif;
  cursor: wait;
}

.add_position__title {
  flex: 2;
}

.add_position__fields {
  flex: 3;
}

.add_position__button {
  flex: 1;
  border: 0;
  outline: 0;
  background: #af1e23;
  width: 143px;
  cursor: pointer;
  float: right;
  text-transform: uppercase;
  text-align: left;
  color: #fff;
  position: relative;
  font-size: 12px;
  text-align: center;
  text-transform: uppercase;
  font-weight: 700;
  border-radius: 4px;
  height: 45px;
}

.select-container {
  position: relative;
  width: 100%;
}

.select-box::-webkit-calendar-picker-indicator,
.select-box::-webkit-list-button,
.select-box::-webkit-inner-spin-button {
  display: none !important;
  opacity: 0 !important;
  -webkit-appearance: none !important;
  width: 0 !important;
  height: 0 !important;
  position: absolute; 
}

.select-box {
  -moz-appearance: textfield;
}
.select-box {
  width: 100%;
  padding: 12px 15px;
  font-size: 13px;
  color: #1a2b4b;
  border: 1px solid #d1d5db;
  background-color: transparent;
  appearance: none;
  cursor: pointer;
  outline: none;
  min-height: 40px;
  appearance: none !important;
  -webkit-appearance: none !important;
}

.select-label {
  position: absolute;
  top: -10px;
  left: 12px;
  font-size: 13px;
  background-color: white;
  padding: 0 5px;
  pointer-events: none;
}

.select-container::after {
  content: "";
  position: absolute;
  right: 15px;
  top: 50%;
  width: 6px;
  height: 6px;
  border-right: 1px solid #1a2242;
  border-bottom: 1px solid #1a2242;
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
  transition: transform 0.2s;
}

.select-box:focus {
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-container {
  position: relative;
  width: 100%;
}

.input-field {
  width: 100%;
  padding: 12px 15px;
  font-size: 13px;
  color: #1a2b4b;
  border: 1px solid #d1d5db;
  background-color: transparent;
  outline: none;
  min-height: 40px;
  box-sizing: border-box;
}

.input-label {
  position: absolute;
  top: -10px;
  left: 12px;
  font-size: 13px;
  color: #1a2b4b;
  background-color: white;
  padding: 0 5px;
  pointer-events: none;
  z-index: 1;
}

.input-field:focus {
  border-color: #d1d5db;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.input-field::placeholder {
  color: #9ca3af;
  opacity: 1;
}

.position-header {
  display: flex;
  font-weight: bold;
  padding: 20px;
  border-bottom: 1px solid #dedede;
  text-align: center;
}

.position-row {
  display: flex;
  align-items: center;
  padding: 15px 20px;
  background: #f6f6f6;
  border-bottom: 2px solid white;
}

.position-row:nth-child(even) {
  background: #ffffff;
}

.position-cell {
  flex: 1;
  text-align: center;
}

.cell-rynek {
  flex: 0.5;
}
.cell-symbol {
  flex: 0.5;
}
.cell-nominal {
  flex: 2;
}
.cell-direction {
  flex: 1;
}
.cell-deposit {
  flex: 1;
}
.cell-delete {
  flex: 0.3;
}
.cell-refresh {
  flex: 0.3;
}


.mobile-label {
  display: none;
}
.delete-action, .refresh-action {
  background: none;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
}

@keyframes spin-refresh {
    to {
        transform: rotate(360deg);
    }
}

.refresh-action {
    position: relative; 
    display: flex; 
    align-items: center;
    justify-content: center;
    width: 24px; 
    height: 24px;
    padding: 0;
    overflow: hidden;
}

.refresh-action.is-loading .refreshImg,
.refresh-action.is-loading .delete-text { 
    display: none;
}

.refresh-action.is-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid rgba(0, 0, 0, 0.2);
    border-top-color: #485492; 
    border-radius: 50%;
    animation: spin-refresh 0.8s linear infinite; 
}

.refresh-action.is-loading {
    pointer-events: none;
    opacity: 0.7; 
}

.delete-text {
  display: none;
}

.separator {
  margin: 0 5px;
  line-height: 40px;
}

.position-row:nth-child(even) .select-label,
.position-row:nth-child(even) .input-label {
  background-color: #ffffff;
}

.position-row:nth-child(odd) .select-label,
.position-row:nth-child(odd) .input-label {
  background-color: #f6f6f6;
}

.summary {
  background-color: #f6f6f6;
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-inline: 20px;
  flex-wrap: wrap;
}
.summary p {
  display: inline;
  font-weight: bold;
  font-size: 15px;
}



@media (max-width: 768px) {
  .position-header {
    display: none;
  }

  .position-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    padding: 20px;
  }

  .position-cell {
    text-align: left;
    display: flex;
    flex-direction: column;
    width: 100%;
  }

  .cell-nominal,
  .cell-direction,
  .cell-deposit {
    grid-column: span 2;
  }

  .cell-symbol {
    margin-left: 20px;
  }

  .mobile-label {
    display: block;
    font-weight: bold;
    font-size: 14px;
    margin-bottom: 8px;
    color: #1a2237;
  }

  .value-text {
    font-size: 13px;
  }

  .select_form {
    flex-direction: row;
    justify-content: flex-start;
  }

  .delete-action {
    width: 100%;
    justify-content: flex-end;
    color: #af1e23;
    font-weight: bold;
    margin-top: 10px;
  }

  .refresh-action {
    width: 100%;
    justify-content: flex-start;
    color: #475491;
    font-weight: bold;
    margin-top: 10px;
    gap: 10px;
  }

  .delete-text {
    display: inline;
    font-size: 12px;
  }

  .row .select-label,
  .row .input-label {
    background-color: #fff;
  }

  #logo {
    flex-direction: column;
  }
  .title {
    margin-top: 20px;
    font-size: 28px;
    line-height: normal;
  }

  .add_position__fields {
    flex-direction: column;
    gap: 20px;
  }
  .add_position__title,
  .title,
  .app_description {
    text-align: center;
  }
  .add_position__button {
    width: 100%;
  }
}

@media (max-width: 992px) {
  #add_position form {
    flex-direction: column;
    align-items: flex-start;
  }
  .add_position__button {
    line-height: 40px;
  }
  .add_position__fields {
    width: 100%;
  }
}
