@import url('footer.css');

:root {
  --primary-color: #205883;
  --secondary-color: rgb(20, 57, 85);
  --accent-color: rgb(243, 203, 23);
  --confirm-color: green;
  --deny-color: red;
  --error-color: red;
  --disabled-color: #999;
  --alert-color: orange;

  --primary-text: #ffffff;
  --secondary-text: white;
  --accent-text: black;
  --confirm-text: white;
  --deny-text: white;
  --disabled-text: black;

  --light-text: #ffffff;
  --dark-text: #111;
  --soft-text: #444;

  --border-radius: 4px;

  --transition-mid: 200ms cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  line-height: 1.7;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: 'Verdana', sans-serif;
}

*::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

*::-webkit-scrollbar-track {
  background-color: rgba(255, 255, 255, 0.4);
}

*::-webkit-scrollbar-thumb {
  background: var(--primary-color);
  /* border-radius: var(--border-radius); */
}

body {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
}

.alert {
  display: flex;
  align-items: center;
  justify-content: center;
  width: max-content;
  max-width: 40%;
  padding: .5rem 2rem;
  margin: 20px auto;
  border: 3px solid orange;
  border-radius: var(--border-radius);
  background: var(--primary-color);
  color: var(--primary-text);
}


.alert.success {
  border: none;
  background: var(--accent-color);
  color: var(--accent-text);

  background-color: #f0c040;
  background-image: linear-gradient(120deg, #daa520, #ffd700, #daa520);
  background-size: 200% 200%;
  animation: moverFondo 5s linear infinite alternate;
}

@keyframes moverFondo {
  0% {
    background-position: 100% 0;
  }

  100% {
    background-position: 0 0;
  }
}

.alert.neutro {
  background: white;
  border: black 1px solid;
  color: black;
}


header {
  --header-height: 60px;
  height: var(--header-height);
  background-color: var(--primary-color);
  color: var(--primary-text);


  display: flex;
  flex-direction: row;
  align-items: center;
}

nav {
  display: flex;
  flex-direction: row;
  align-items: center;

  justify-content: left;
  gap: 2rem;
  padding: 1rem 0;
}

nav a {
  text-align: center;
  text-decoration: none;
  user-select: none;
  color: var(--primary-text);
  font-weight: bold;
  font-size: 1.25rem;

  padding: .5rem;
  border-radius: var(--border-radius);
  max-width: 150px;

  transition: var(--transition-mid);

  &:hover {
    background-color: var(--secondary-color);
  }
}

.header-logo {
  user-select: none;

  height: calc(var(--header-height) * 0.8);
  width: calc(var(--header-height) * 0.8);
  border-radius: var(--border-radius);

  /* background-color: white; */
}

.form {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  padding: 1rem;

  background: white;
}

.form-principal {
  position: relative;

  max-width: 850px;
  width: 100%;
  margin: auto;

  border: black 1px solid;
  border-radius: var(--border-radius);
}

.form-item {
  display: flex;
  flex-direction: column;
  gap: .5rem;

  color: var(--soft-text);
}

.icon-input {
  display: flex;
  gap: 1rem;
  align-items: center;
}

ul.form-errors,
ul.form-alerts {
  & li {
    padding: .5rem;

    border: 2px solid var(--error-color);
    border-radius: var(--border-radius);

    &:not(:last-child) {
      margin-bottom: .25rem;
    }

    &::marker {
      content: "";
    }
  }
}

ul.form-alerts {
  & li {
    border-color: var(--alert-color);
  }
}

input[type="text"],
input[type="password"],
input[type="number"],
input[type="email"],
textarea {
  --resalto: var(--primary-color);
  padding: .5rem 1rem;

  border: 1px solid black;
  border-radius: var(--border-radius);

  text-align: justify;
}

input[type="text"]:focus-visible,
input[type="password"]:focus-visible,
input[type="number"]:focus-visible,
input[type="email"]:focus-visible,
textarea:focus-visible {
  outline: 1px var(--resalto) solid;
}

textarea {
  max-width: 100%;
  min-width: 100%;
  max-height: 30vh;
  min-height: 70px;
}

input[type="checkbox"] {
  --resalto: var(--primary-color);
  width: 1.25rem;
  height: 1.25rem;
  cursor: pointer;
  accent-color: var(--primary-color);
  border: 1px solid black;
  border-radius: var(--border-radius);
}

input[type="checkbox"]:focus-visible {
  outline: 1px var(--resalto) solid;
}

.btn {
  cursor: pointer;
  user-select: none;

  background-color: var(--primary-color);
  color: var(--primary-text);

  border: black 1px solid;
  border-radius: var(--border-radius);
  font-size: large;

  padding: .5rem;

  transition: var(--transition-mid);
}

.btn:hover {
  background-color: var(--secondary-color);
}

.upload-btn {
  height: 2.5rem;
  display: flex;
  align-items: center;
  align-self: flex-start;
  justify-content: center;
  gap: .5rem;
}

#staged-file {
  display: none;
  align-items: center;

  width: max-content;
  padding: .25rem .5rem;

  border: black 1px solid;
  border-radius: var(--border-radius);
}

.dragging::before {
  content: 'Suelta el archivo aquí';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 10;

  background-color: var(--primary-color);
  color: var(--primary-text);
  font-size: 1.5em;
  backdrop-filter: blur(5px);
}



.cargando {
  width: 50px;
  height: 50px;
  border-radius: 50%;

  position: relative;

  border: 3px solid black;
}

.cargando::before,
.cargando::after {
  content: "";
  position: absolute;
  left: -18%;
  top: -18%;
  width: inherit;
  height: inherit;

  border-radius: inherit;
  border: 5px solid transparent;

  animation: spin 2s linear infinite;
}

.cargando::before {
  border-top-color: var(--primary-color);
}

.cargando::after {
  border-bottom-color: var(--primary-color);
}

@keyframes spin {
  0% {
    transform: rotate(0deg);
  }

  100% {
    transform: rotate(360deg);
  }
}


table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  min-width: 800px;
  overflow: scroll;
}

table th {
  user-select: none;
  background: var(--primary-color);
  color: var(--primary-text);
  font-weight: 600;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 1.5px;
  padding: 1.2rem;
  text-align: left;
  border: none;
}

table td {
  padding: 1.2rem;
  font-size: 0.95rem;
  color: var(--dark-text);
  border: 1px solid var(--primary-color);
}

table tr {
  background: white;
}

table tr:first-child th:first-child {
  border-top-left-radius: var(--border-radius);
}

table tr:first-child th:last-child {
  border-top-right-radius: var(--border-radius);
}

table tr:last-child td:first-child {
  border-bottom-left-radius: var(--border-radius);
}

table tr:last-child td:last-child {
  border-bottom-right-radius: var(--border-radius);
}


table tr:hover td {
  background-color: #f7fafc;
}

table .btn {
  height: 30px;
  width: 30px;
  border: 1px solid var(--primary-color);
  background-color: white;
  color: var(--primary-color);
  font-weight: bolder;

  padding: 0;
  font-size: inherit;

  &:hover {
    color: var(--light-text);
    border: 1px solid var(--light-text);
  }
}


dialog[open] {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  width: 80%;
  height: 80%;
  margin: auto;

  border: 1px solid #ccc;
  border-radius: 8px;
}

dialog::backdrop {
  background-color: color-mix(in srgb, var(--primary-color), transparent 70%);
  backdrop-filter: blur(5px);
}

.confirm-dialog[open] {
  max-height: 50vh;
  max-width: 50%;
  height: max-content;
  align-items: center;
  gap: 2rem;
  padding: 2rem;
  font-size: x-large;

  border: .5rem solid var(--primary-color);
}

iframe {
  flex-grow: 1;
  border: none;
}

#doc-error-message {
  flex-grow: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  color: var(--error-color);
  padding: 3rem;
  text-align: center;
  margin: auto;
}

.close-dialog-btn {
  border-top-left-radius: 0;
  border-top-right-radius: 0;
}

.actions {
  display: flex;
  flex-direction: row;
  gap: 3rem;
}

.form-actions {
  gap: 1rem;

  & button {
    width: 100px;
  }
}

.confirm-dialog-btn,
.deny-dialog-btn {
  width: fit-content;
  padding: .5rem;
}

.confirm-dialog-btn {
  background-color: var(--confirm-color);
  color: var(--confirm-text);

  &:hover {
    background-color: var(--confirm-color);
  }
}

.deny-dialog-btn {
  background-color: var(--deny-color);
  color: var(--deny-text);

  &:hover {
    background-color: var(--deny-color);
  }
}


.action-btn {
  background-color: var(--primary-color);
  color: var(--primary-text);
  display: flex;
  align-items: center;
  justify-content: center;

  &:hover {
    background-color: var(--secondary-color);
  }
}

.tooltip-wrapper {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
}

.tooltip-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.2rem;
  height: 1.2rem;
  border-radius: 50%;
  background-color: var(--primary-color);
  color: var(--primary-text);
  font-size: 0.75rem;
  font-weight: bold;
  cursor: help;
  user-select: none;
  transition: var(--transition-mid);
  flex-shrink: 0;
}

.tooltip-icon:hover {
  background-color: var(--secondary-color);
}

.tooltip-text {
  position: absolute;
  bottom: calc(100% + 0.5rem);
  left: 50%;
  transform: translateX(-50%);
  padding: 0.5rem 0.75rem;
  background-color: var(--dark-text);
  color: var(--light-text);
  font-size: 0.85rem;
  line-height: 1.4;
  border-radius: var(--border-radius);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-mid), transform var(--transition-mid);
  transform: translateX(-50%) translateY(-0.25rem);
  z-index: 1000;
  max-width: 450px;
  min-width: 250px;
  white-space: normal;
  text-align: left;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.tooltip-text::before {
  content: "";
  position: absolute;
  top: 100%;
  left: 50%;
  transform: translateX(-50%);
  border: 0.4rem solid transparent;
  border-top-color: var(--dark-text);
}

.tooltip-icon:hover+.tooltip-text,
.tooltip-wrapper:hover .tooltip-text {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(-50%) translateY(0);
}


.section {
  padding: 2rem 0;
  margin: 2rem 0;
  color: var(--dark-text);
}

.justify {
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: justify;
}

.container {
  max-width: 900px;
  width: 100%;
  margin: auto;
}