@import url('https://fonts.googleapis.com/css2?family=Cabin:ital,wght@0,400..700;1,400..700&family=Figtree:ital,wght@0,300..900;1,300..900&display=swap');

/* ===== Base typography & global ===== */

body, a, h1, h2, h3, h4, h5, h6, p {
  font-family: "Figtree", serif !important;
}

body {
  padding-top: 80px;
  padding-bottom: 40px;
  background-color: #f2f2f2;
  font-size: 14px !important;
}

p {
  padding: 10px 0;
}

/* Keep all non-table text at 14px */
body *:not(table):not(table *) {
  font-size: 14px !important;
}

/* ===== Layout & container ===== */

.container {
  width: 100% !important;   /* new: replaces fixed 1300px */
  padding: 0 50px !important;
}

.row [class^="col-"] {
  padding: 15px !important;
}

.container > .row {
  border: 0 solid #ddd;
  background: #fff;
  padding: 30px;
  border-radius: 15px;
  box-shadow: 0 15px 15px rgba(0,0,0,.05);
}

/* ===== Buttons ===== */

.btn {
  margin: 0 5px 15px; /* new: keep side margin + bottom spacing */
  border-radius: 15px !important;
}

.btn-xs {
  padding: 5px 10px;
  margin: 0;
}

.btn-primary {
  background: #6d71cd;
  border-color: #4145b4;
}
.btn-primary:hover {
  background: #4145b4;
}

.btn-default:hover {
  background: #fff;
}

/* ===== Forms & inputs ===== */

.form-control:focus {
  box-shadow: 0 0 5px #6d71cd;
  border-color: #6d71cd;
}

input,
textarea,
select,
.alert,
.select2 span,
.select2-dropdown {
  border-radius: 15px !important;
}

.round-inputs {
  margin: 10px 0;
}
.round-inputs input {
  border-radius: 0;
}
.round-inputs input:first-child {
  border-top-left-radius: 5px;
  border-top-right-radius: 5px;
}
.round-inputs input:last-child {
  border-bottom-left-radius: 5px;
  border-bottom-right-radius: 5px;
}

/* Sign-in form */

.form-signin {
  max-width: 330px;
  padding: 15px;
  margin: 0 auto;
}
.form-signin .form-signin-heading {
  margin-bottom: 10px;
  font-weight: 100;
  text-align: center;
}
.form-signin .checkbox {
  font-weight: normal;
}
.form-signin .form-control {
  position: relative;
  height: auto;
  box-sizing: border-box;
  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;
}
.form-signin input {
  margin-bottom: 15px !important;
}

/* Input groups */

.input-group-addon {
  background: none;
  border: 0;
}
.input-group-btn {
  padding-left: 15px !important;
}

/* ===== Select2 ===== */

.select2 {
  width: calc(100% - 50px) !important; /* new */
  min-width: 180px !important;         /* new */
}

.select2 span:first-child {
  width: 94%;
}

.select2 .select2-selection__arrow {
  margin-right: 25px;
}

/* ===== Alerts ===== */

.alert-info {
  background: #e7e7f6 !important;
  border-color: #aaacdd !important;
  color: #4145b4;
}

/* ===== Navbar & branding ===== */

.navbar-default {
  background: #fff;
  background-image: none;
}

.navbar-default .navbar-nav > li > a {
  font-size: 16px;
}

.navbar-brand img {
  height: 40px;
  margin: -8px 0 0 0;
}

.navbar-default .navbar-nav > .active > a,
.navbar-default .navbar-nav > .active > a:hover,
.navbar-default .navbar-nav > .active > a:focus {
  box-shadow: inset 0 -2px 0 #243274 !important;
  background: none !important;
  color: #243274 !important;
  text-shadow: none !important;
  border: 0 !important;
}

/* ===== Footer ===== */

.footer {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 1030;
  background: #f2f2f2;
  border-top: 1px solid #ddd;
  padding: 8px 20px;
}

body .footer,
body .footer * {
  font-size: 10px !important;
}

.footer p {
  margin: 0;
  padding: 0;
  text-align: center;
}
.footer p small {
  font-size: 10px !important;
  letter-spacing: 1px;
}

/* ===== Icons & misc ===== */

.fa-flag {
  color: #e69810;
}

.mainc h2 {
  padding: 20px 0 !important;
  border-bottom: 1px solid #f2f2f2;
}

hr {
  border-color: #fff !important;
}

/* ===== Avatars ===== */

.dp {
  width: 32px;
  height: 32px;
  background-position: center center;
  background: #fff;
  background-size: cover;
}
.dp-left {
  height: 64px;
  width: 64px;
  float: left;
  background-size: cover;
  margin-right: 10px;
}

/* ===== Back to top ===== */

.backtotop {
  position: fixed;
  bottom: 0;
  right: 0;
  cursor: pointer;
}
.backtotop p {
  border: 1px solid #4145b4;
  background: #6d71cd;
  padding: 10px;
  margin: 0 10px;
}
.backtotop p a {
  color: #fff !important;
}

/* ===== Autocomplete ===== */

.ui-autocomplete {
  max-height: 300px;
  overflow-y: auto;
  overflow-x: hidden;
}
* html .ui-autocomplete {
  height: 100px;
}

/* ===== Map area ===== */

#map-area {
  background: url('../media/img/ukmap-invert.png') no-repeat -220px -110px;
  height: 900px;
  margin-top: -20px;
  border: 1px solid #ddd;
  border-radius: 15px;
  max-width: 100%;
  max-height: 900px;
  overflow: visible;
}
#map-area .marker {
  position: absolute;
  margin-top: -20px;
}

/* ===== Tooltips ===== */

#aToolTip {
  position: absolute;
  display: none;
  z-index: 50000;
}
#aToolTip .aToolTipContent {
  position: relative;
  margin: 0;
  padding: 0;
}
.defaultTheme {
  border: 2px solid #4a4cb0;
  background: #fff;
  color: #333;
  margin: 0;
  padding: 6px 12px;
  border-radius: 12px 12px 12px 0;
  box-shadow: 2px 2px 5px rgba(0,0,0,0.5);
}
.defaultTheme #aToolTipCloseBtn {
  display: block;
  height: 18px;
  width: 18px;
  background: url(../images/closeBtn.png) no-repeat;
  text-indent: -9999px;
  outline: none;
  position: absolute;
  top: -20px;
  right: -30px;
  margin: 2px;
  padding: 4px;
}

/* ===== Panels ===== */

.panel {
  border-radius: 15px;
}
.panel-heading {
  border-top-left-radius: 15px;
  border-top-right-radius: 15px;
}
.panel-body input {
  margin-bottom: 15px;
}
.panel-heading span {
  margin-top: -5px;
}

/* ===== .table (Bootstrap-like) ===== */

.table {
  width: 100%;
  border-collapse: separate;
  border-radius: 15px !important;
  margin: 15px 0;
  border: 0 solid #f2f2f2;
  overflow: visible;
}

.table > thead > tr > th {
  border-bottom-width: 0 !important;
}

/* header cells */
.table th,
.table th:hover {
  background: #E1E3F2 !important;          /* new */
  padding: 10px 10px 5px 10px !important;
}

.table thead {
  border-bottom-color: #E1E3F2;            /* new */
}

.table thead tr:first-child th:first-child {
  border-top-left-radius: 13px;
}
.table thead tr:first-child th:last-child {
  border-top-right-radius: 13px;
}

/* body cells */
.table td {
  vertical-align: middle !important;
  font-size: 1.5rem !important;            /* new: match body */
  border-right-color: transparent !important;
}

.table td:last-child {
  border-right-color: #ddd !important;
}

.table tr:hover {
  background: #FFF8E1;                     /* new row hover */
}

/* side borders on first/last cell */
.table tr td:first-child {
  border-left: 1px solid #f2f2f2;          /* new */
}
.table tr td:last-child {
  border-right: 1px solid #f2f2f2;         /* new */
}

/* last row bottom borders & radius */
.table tr:last-child td {
  border-bottom: 3px solid #f2f2f2;
}
.table tr:last-child td:first-child {
  border-bottom-left-radius: 15px;
}
.table tr:last-child td:last-child {
  border-bottom-right-radius: 15px;
}

/* special thead marker */
.table thead[id*="-"] {
  border-top: 5px solid red !important;    /* new */
}

/* ===== Generic table + horizontal scroll ===== */

table {
  width: 100%;
  border-collapse: collapse;
  min-width: 600px;
}

.table-wrapper {
  width: calc(100% + 30px);
  margin-left: -15px;
  margin-right: -15px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

.mainc > .row > .table-wrapper {
  width: calc(100% + 60px);
  margin-left: -30px;
  margin-right: -30px;
}

table th,
table td {
  padding: 0.5rem 0.75rem;
  border: 1px solid #ddd;
  text-align: left;
  white-space: nowrap;
}

/* ===== Mobile sub-header collapse ===== */

.mobile-subheader-toggle {
  display: none;
}

.mobile-subheader-primary {
  margin-bottom: 10px;
}

@media screen and (max-width: 767px) {
  .mobile-subheader-toolbar {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin: 0 0 10px;
  }

  .mobile-subheader-toolbar .mobile-subheader-primary {
    margin: 0;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  .mobile-subheader-toolbar .mobile-subheader-primary .btn {
    margin: 0 !important;
    white-space: nowrap;
  }

  .mobile-subheader {
    margin-left: 0 !important;
    margin-right: 0 !important;
  }

  .mobile-subheader > [class^="col-"],
  .mobile-subheader > [class*=" col-"] {
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .mobile-subheader-primary .btn {
    margin: 0 8px 10px 0;
  }

  .mobile-subheader-toggle {
    display: block;
    width: 100%;
    margin: 0 0 10px;
    text-align: left;
    border-radius: 12px !important;
    background: #fff;
  }

  .mobile-subheader-toolbar .mobile-subheader-toggle {
    flex: 1;
    width: auto;
    margin: 0;
  }

  .mobile-subheader-toggle .mobile-subheader-caret {
    float: right;
    transition: transform 0.2s ease;
  }

  .mobile-subheader-toggle.is-open .mobile-subheader-caret {
    transform: rotate(180deg);
  }

  .mobile-subheader-collapse {
    margin-bottom: 10px;
    padding: 10px 12px;
    border: 1px solid #e5e8f3;
    border-radius: 12px;
    background: #fff;
  }

  .mobile-subheader .pull-right {
    float: none !important;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 8px;
  }

  .mobile-subheader .btn-group {
    display: flex;
    flex-wrap: wrap;
    width: 100%;
  }

  .mobile-subheader .btn-group .btn {
    margin: 0 8px 8px 0 !important;
  }

  .mobile-subheader .input-group {
    display: block;
    width: 100%;
  }

  .mobile-subheader .input-group-addon {
    display: block;
    width: 100%;
    margin: 0 0 6px;
    text-align: left;
    white-space: normal;
    border-radius: 10px !important;
  }

  .mobile-subheader .input-group .form-control {
    display: block;
    width: 100%;
  }

  .mobile-subheader .input-group-btn {
    display: block;
    padding-left: 0 !important;
  }
}

@media screen and (min-width: 768px) {
  .mobile-subheader-toolbar {
    display: block;
  }

  .mobile-subheader-primary {
    margin-bottom: 0;
  }

  .mobile-subheader-toggle {
    display: none !important;
  }

  .mobile-subheader-collapse {
    display: block !important;
    height: auto !important;
    overflow: visible !important;
  }
}

/* ===== Responsive tables (horizontal scroll) ===== */

@media screen and (max-width: 991px) {
  body {
    font-size: 14px !important;
  }

  .container {
    padding: 0 20px !important;
  }

  .container > .row {
    padding: 20px;
  }

  .row [class^="col-"] {
    padding: 10px !important;
  }

  .select2 {
    width: 100% !important;
    min-width: 0 !important;
  }

  .table-wrapper {
    width: calc(100% + 20px);
    margin-left: -10px;
    margin-right: -10px;
  }

  .mainc > .row > .table-wrapper {
    width: calc(100% + 40px);
    margin-left: -20px;
    margin-right: -20px;
  }
}

@media screen and (max-width: 767px) {
  body {
    font-size: 14px !important;
    padding-top: 70px;
  }

  .container {
    padding: 0 12px !important;
  }

  .container > .row {
    padding: 14px;
    border-radius: 12px;
    margin-left: 0;
    margin-right: 0;
  }

  .mainc form .btn {
    width: 100%;
    margin: 0 0 10px;
  }

  .panel,
  .panel-heading,
  .panel-body {
    width: 100% !important;
    max-width: 100% !important;
    box-sizing: border-box;
  }

  .table-wrapper {
    width: calc(100% + 20px);
    overflow-x: auto;
    overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    margin-left: -10px;
    margin-right: -10px;
    margin-bottom: 12px;
    border-radius: 12px;
  }

  .mainc > .row > .table-wrapper {
    width: calc(100% + 28px);
    margin-left: -14px;
    margin-right: -14px;
  }

  .mainc table,
  .mainc .table {
    width: max-content;
    min-width: 100%;
  }

  .mainc table th,
  .mainc table td {
    white-space: nowrap;
  }

  .mainc .table > thead {
    display: table-header-group;
  }

  .mainc .table > tbody {
    display: table-row-group;
  }

  .mainc .table > tbody > tr {
    display: table-row;
    width: auto;
    max-width: none;
    margin: 0;
    border: 0 !important;
    border-radius: 0;
    box-shadow: none;
    background: transparent;
    overflow: visible;
  }

  .mainc .table > thead > tr > th,
  .mainc .table > tbody > tr > td {
    display: table-cell;
    width: auto;
    padding: 0.5rem 0.75rem !important;
    border: 1px solid #ddd !important;
    font-size: 1.5rem !important;
    vertical-align: middle !important;
    white-space: nowrap;
    word-break: normal;
    overflow-wrap: normal;
  }

  .mainc .table > tbody > tr > td::before {
    display: none;
    content: none;
  }

  .mainc .table > tbody > tr > td .btn {
    white-space: nowrap;
    max-width: none;
  }
}

/* ===== Responsive layout for map/container ===== */

@media screen and (max-width: 760px) {
  #map-area {
    display: none;
  }
  .container {
    overflow: hidden !important;
    max-width: 100vw !important;
  }
}

/* Bookings page table wrapper: keep gutters inside card */
.mainc > .row > .booking-table-wrapper {
  width: calc(100% - 24px) !important;
  margin-left: 12px !important;
  margin-right: 12px !important;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
