@import './global.css';

.content-table {
  border-collapse: collapse;
  font-size: 15px;
  border-radius: var(--border-radius) var(--border-radius) 0 0;
  background-color: var(--fb-green);
  box-shadow: 0 0 20px rgba(0, 0, 0, 0.15);
}

.content-table thead {
  color: white;
  text-align: left;
  font-weight: bold;
}

.content-table th, .content-table td {
  padding: 12px 15px;
}

.content-table tbody {
  border-bottom: 1px solid #dddddd;
  background-color: white;
}

.rowEven {
  background-color: #f3f3f3;
}

.content-table tbody tr:last-of-type {
  border-bottom: 2px solid var(--fb-green);
}

input {
  text-align: right;
  width: 65px;
  border: 1px solid #ccc;
  border-radius: var(--border-radius);
  padding: 3px;
}

input:invalid {
	background-color: red;
}

select {
	padding: 1px 2px;
  border: 1px solid #ccc;
  border-radius: var(--border-radius);
}

.hidden {
  opacity: 0;
}

.redAlert {
  background-color: red !important;
}

td.right-align, 
th.right-align {
  text-align: right;
}

.left-align {
  text-align: left;
}

/* td with notes textarea are special - overwrite */
.content-table td.notes-td {
  padding: 0;
}

/* hide (by collapsing) note textarea by default */
.notes-container {
  max-height: 0px;
  overflow: hidden;
}

/* show (by expanding) note textarea on focus in Input or Textarea itself */
tr:focus-within + tr .notes-container,
tr:focus-within .notes-container
{
  max-height: fit-content;
  padding: 0 15px 12px 15px;
}

.notes {
  border: 1px solid #ccc;
  border-radius: var(--border-radius);
  width: 100%;
  padding: 0.5em;
  resize: none;
  font-family: inherit;
}

position-relative {
  position: relative;
  width: max-content;
}

position-absolute {
  position: absolute;
  display: inline-block;
  left: calc(100% + 0.5em);
  width: max-content;
}

tooltip-top {
  position: relative;
  display: inline-block;
}

tooltip-top:hover {
  cursor: help;
}

tooltip-content {
  /* Fade-in on hover */
  visibility: hidden;
 
  /* Position the tooltip above tooltip element*/
  position: absolute;
  z-index: 1;
  bottom: calc(100% + 5px);
  left: -15px;
}

tooltip-content-inner {
  display: block;
  width: max-content;
  min-width: 75px;
  max-width: 280px;
  background-color: #555;
  color: #fff;
  padding: 5px;
  border-radius: 6px;
  font-size: 0.9rem;
}

.allow-linebreak {
  white-space: pre-line;
}

tooltip-top::after {
  content: "";
  position: absolute;
  visibility: hidden;

  /* Make the angle/arrow */
  border-style: solid;
  border-width: 5px;
  border-color: #555 transparent transparent transparent;

  /* Position at the bottom of the tooltip, center of parent */
  top: -5px;
  left: 50%;
  transform: translate(-50%);
}

.content-table tooltip-content, tooltip-content.shift-left {
  left: -45px;
}

tooltip-top:hover tooltip-content, tooltip-top:hover::after {
  visibility: visible;
}

.available-vacation-details {
  display: grid;
  grid-template-columns: max-content max-content;
  gap: 2px;
}

.dotted-underline {
  border-bottom: 1px dotted black;
}


/* Override design in Phones */
@media screen and (max-width: 740px) {
  page-main {
    grid-template-columns: max-content;
  }

  .content-table th,
  .content-table td {
    padding: 8px 15px;
  }
}