/* Hotel Villa Taina portal - styles ported from the former Vue/bootstrap-vue frontend */

html, body {
  font-size: 14px;
  padding: 0;
  height: 100%;
  background-color: white;
}

body {
  font-family: 'Avenir', Helvetica, Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-align: center;
  color: #2c3e50;
}

h1 { font-size: 1.3em !important; }

label, .form-label { text-align: left; display: block; }

/* Bootstrap 4 look: links without underline */
a { text-decoration: none; }
a:hover { text-decoration: underline; }
.btn:hover, .dropdown-item:hover, #sidebar a:hover, .page-link:hover { text-decoration: none; }

.btn-outline { border: none; background: transparent; }
.btn-outline:hover { background: #f5f5f5; }

/* ---------------------------------------------------
    LAYOUT
----------------------------------------------------- */
.wrapper {
  display: flex;
  width: 100%;
  align-items: stretch;
  perspective: 1500px;
}

#content {
  width: 100%;
  min-height: 100vh;
  transition: all 0.3s;
  min-width: 0;
  animation: fadeIn .6s ease-in;
}

@keyframes fadeIn {
  0% { opacity: 0; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* ---------------------------------------------------
    SIDEBAR
----------------------------------------------------- */
img.sidebar-logo {
  width: auto;
  max-width: 200px;
  height: 64px;
}

#sidebar {
  min-width: 250px;
  max-width: 250px;
  color: #000;
  transition: all 0.6s cubic-bezier(0.945, 0.020, 0.270, 0.665);
  transform-origin: bottom left;
  background: #e3eff8;
  background: linear-gradient(to right, #e3eff8 0%, #a4c3ee 100%);
  position: relative;
}

#sidebar:not(.active) {
  margin-left: -250px;
  transform: rotateY(90deg);
}

#sidebar.active {
  margin-left: 0;
  transform: none;
}

#sidebar .sidebar-header {
  padding: 20px;
  background: linear-gradient(to right, #e3eff8 0%, #a4c3ee 100%);
}

#sidebar ul.components {
  padding: 20px 0;
  margin: 0;
}

#sidebar ul { list-style: none; padding-left: 0; }

#sidebar a { color: inherit; }

#sidebar ul li a {
  color: inherit;
  padding: 10px;
  font-size: 1.1em;
  display: block;
}

#sidebar ul li a:hover {
  color: #7386D5;
  background: #fff;
}

#sidebar ul li.active > a, #sidebar a[aria-expanded="true"] {
  color: #0821e9;
  background: #f5f5f5;
}

#sidebar .dropdown-toggle { position: relative; }

#sidebar .dropdown-toggle::after {
  display: block;
  position: absolute;
  top: 50%;
  right: 20px;
  transform: translateY(-50%);
}

#sidebar ul ul a {
  font-size: 0.9em !important;
  padding-left: 30px !important;
}

#footer {
  font-size: 10px;
  position: fixed;
  bottom: 5px;
  text-align: center;
  width: 250px;
}

#sidebar:not(.active) #footer { display: none; }

@media (max-width: 1199.98px) {
  #sidebar {
    position: fixed;
    z-index: 1040;
    height: 100vh;
    overflow-y: auto;
  }
}

/* sidebar toggle (hamburger) */
#sidebarCollapse {
  width: 40px;
  height: 40px;
  background: #f5f5f5;
  cursor: pointer;
  border: none;
  box-shadow: none;
  outline: none !important;
}

#sidebarCollapse span {
  width: 80%;
  height: 2px;
  margin: 5px auto;
  display: block;
  background: #555;
  transition: all 0.8s cubic-bezier(0.810, -0.330, 0.345, 1.375);
  transition-delay: 0.2s;
}

#sidebarCollapse.active span { margin: 0 auto; }
#sidebarCollapse.active span:first-of-type { transform: rotate(45deg) translate(2px, 2px); }
#sidebarCollapse.active span:nth-of-type(2) { opacity: 0; }
#sidebarCollapse.active span:last-of-type { transform: rotate(-45deg) translate(1px, -1px); }

/* ---------------------------------------------------
    NAVBAR
----------------------------------------------------- */
.navbar.main-navbar {
  padding: 15px 10px;
  background: #fff;
  border: none;
  border-radius: 0;
  margin-bottom: 20px;
  box-shadow: 1px 1px 3px rgba(0, 0, 0, 0.1);
}

.main-navbar h1 { margin: 0; }

.main-navbar .nav-tools {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 2px;
}

.main-navbar .btn-link { color: #2c3e50; }

#language-switcher .dropdown-toggle { border: none; }
#language-switcher .dropdown-menu { width: 60px; min-width: 60px !important; }
.flag-icon { width: 1.333em; height: 1em; vertical-align: -0.1em; border-radius: 1px; }

/* avatar with initials */
.avatar-circle {
  width: 32px;
  height: 32px;
  background-color: #1e4a77;
  text-align: center;
  border-radius: 50%;
  margin-right: 5px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.avatar-initials {
  font-size: 14px;
  line-height: 14px;
  color: #fff;
  font-family: "Courier New", monospace;
  font-weight: bold;
}

/* notifications */
#notification-item .dropdown-menu { width: 460px; max-width: 95vw; padding: 0; }
#notification-item .notification-box { padding: 10px 0; list-style: none; border-bottom: 1px solid #1e4a77; }
#notification-item .unseen { color: red; }
#notification-item .notification-box .btn { font-size: 90%; }

/* ---------------------------------------------------
    PAGES
----------------------------------------------------- */
.siteTitle { margin-top: 0; margin-bottom: 15px; }

/* table rows that open details/links */
.table-clickable tbody tr[data-href], .table-clickable tbody tr[data-details] { cursor: pointer; }
.table td.align-right, .table th.align-right { text-align: right; }
.table td.align-left, .table th.align-left { text-align: left; }
.table td.align-center, .table th.align-center { text-align: center; }
.table .btn-icon { padding-top: 0; padding-bottom: 0; border: none; }
.table th a { color: inherit; }
.table th .sort-icon { font-size: 0.75em; opacity: 0.6; margin-right: 3px; }
.table tr.details-row > td { background: #fff; }
.table tr.corrected > td { text-decoration: line-through; opacity: 0.6; }

.search-box {
  margin-top: 15px;
  border-bottom: 1px solid #ddd;
  border-top: 1px solid #ddd;
  background: #eee;
  border-radius: 5px;
  padding: 10px;
}
.search-box label { font-size: 90%; }

.table-busy { display: none; }

/* changelog on the dashboard */
#changelogList { padding: 0; list-style-type: none; font-size: small; }
#changelogList li { text-align: left; display: flex; }
#changelogList div.bugtype {
  border: none;
  padding: 3px;
  width: 20px;
  min-width: 20px;
  height: 20px;
  line-height: 16px;
  margin: 3px 0 3px 5px;
  text-align: center;
  font-size: 10px;
  font-weight: bold;
}
#changelogList .bugtype.type_fix { background-color: rgba(255, 0, 0, 0.51); }
#changelogList .bugtype.type_new { background-color: rgba(0, 128, 0, 0.51); }
#changelogList .bugtype.type_change { background-color: rgba(0, 0, 255, 0.51); }
#changelogList .bug-text { margin-left: 10px; line-height: 25px; }

/* cashbook */
#cashbook-edit .cashbook-value { font-size: 1.3rem; font-weight: bold; text-align: right; }
#cashbook-edit .cashbook-buttons { text-align: left; }
#cashbook-entry-table, #recibos-table { font-size: 0.85rem; }

/* login */
.login { margin-top: 20px; }
.login .logo { width: 150px; height: auto; }
.form-signin { max-width: 330px; padding: 15px; margin: 0 auto; }
.form-signin .form-signin-heading { margin-bottom: 10px; font-size: 2rem; }
.form-signin .form-control { position: relative; height: auto; padding: 10px; font-size: 16px; }
.form-signin .form-control:focus { z-index: 2; }
.form-signin input[type="text"] { margin-bottom: -1px; border-bottom-right-radius: 0; border-bottom-left-radius: 0; }
.form-signin input[type="password"] { margin-bottom: 10px; border-top-left-radius: 0; border-top-right-radius: 0; }

/* maintenance */
.maintenance-page * { font-family: 'Roboto', sans-serif; }
.maintenance-page .error-template { padding: 40px 15px; text-align: center; }
.maintenance-page .bgimage {
  background-image: url('../img/webmaintenance.png');
  background-repeat: no-repeat;
  background-position: center center;
  min-height: 300px;
}

/* signature modal (fullscreen) */
#modal-signature .modal-dialog { max-width: 100%; margin: 0; height: 100vh; }
#modal-signature .modal-content { height: 100vh; border-radius: 0; }
#signature-canvas { width: 100%; height: 400px; border-bottom: 2px solid #cccccc; touch-action: none; background: #fff; }
.signature-preview { max-height: 120px; max-width: 100%; border-bottom: 1px solid #ccc; }

/* user edit */
#useredit .card { margin-bottom: 15px; text-align: left; }

/* dual list (admin cashbooks) */
.dual-list select { width: 100%; }

/* toasts */
.toast-container { z-index: 1090; }

/* loading overlay */
#page-overlay {
  position: fixed;
  inset: 0;
  background: rgba(255, 255, 255, 0.6);
  z-index: 2000;
  display: none;
  align-items: center;
  justify-content: center;
}
body.loading #page-overlay { display: flex; }

/* dashboard tiles */
.dashboard-tile { text-align: left; transition: box-shadow .2s; }
.dashboard-tile:hover { box-shadow: 0 2px 8px rgba(0, 0, 0, .15); }

/* sticky table headers on long lists */
.table-sticky thead th { position: sticky; top: 0; z-index: 2; background: #fff; box-shadow: inset 0 -1px 0 #dee2e6; }

/* newly booked entry */
@keyframes newRow { from { background-color: #fff3a0; } to { background-color: transparent; } }
.table tr.row-new > td { animation: newRow 4s ease-out; font-weight: 600; }

/* tablets / touch screens: bigger targets, 16px inputs (no zoom on iOS) */
@media (pointer: coarse) {
  .btn-sm, .btn-group-sm > .btn { padding: .4rem .75rem; font-size: .95rem; }
  .btn-icon { padding: .4rem .6rem !important; font-size: 1.1rem; }
  .form-control-sm, .form-select-sm, .form-control, .form-select { font-size: 16px; min-height: 40px; }
  .table-sm > :not(caption) > * > * { padding: .55rem .4rem; }
  #sidebar ul li a { padding: 14px 10px; }
  .page-link { padding: .5rem .85rem; }
  .flatpickr-day { height: 44px; line-height: 44px; }
}

/* WaterClub kiosk (tablet for customers) */
.kiosk { padding-top: 16px; padding-bottom: 30px; }
.kiosk-header { border-bottom: 3px solid #a4c3ee; padding-bottom: 10px; margin-bottom: 20px; }
.kiosk-header h1 { font-size: 2rem !important; }
.kiosk-logo { height: 60px; width: auto; }
.kiosk .form-label { font-weight: 600; margin-bottom: .25rem; }
.kiosk-h2 { font-size: 1.15rem; font-weight: 700; text-transform: uppercase; letter-spacing: .02em; margin-bottom: 12px; }
.kiosk-activities th { font-size: 1rem; width: 34%; }
.kiosk-activities .btn { padding: .6rem .4rem; font-size: 1rem; }
.kiosk-terms { font-size: .95rem; }
.kiosk-terms li { margin-bottom: .4rem; }
.kiosk-accept { font-size: 1.05rem; padding-left: 2.2em; }
.kiosk-accept .form-check-input { width: 1.6em; height: 1.6em; margin-left: -2.2em; margin-top: .05em; }
.kiosk-signature { width: 100%; height: 220px; border: 2px solid #ccc; border-radius: 6px; background: #fff; touch-action: none; }
.kiosk-signature.border-danger { border-color: #dc3545 !important; }
