/* layout and base styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: "Poppins",sans-serif;
}

html, body {
  height: 100%;
  font-family: "Poppins",sans-serif;
}

.page-container {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
/* end base styles */

/* Header and navigation */
.navbar {
  display: flex;
  justify-content: flex-start;
  align-items: center;
  width: 100%;
  padding: 0 20px;
}


header {
  background-color: #F98E00;
  width: 100%;
}

.navbar a,
.dropbtn {
  color: white;
  padding: 14px 16px;
  text-decoration: none;
  background-color: inherit;
  border: none;
  cursor: pointer;
  font-size: 16px;
  display: inline-block;
}

.dropdown {
  position: relative;
}

.dropdown-content {
  display: none;
  position: absolute;
  top: 45px;
  left: 0;
  background-color: #f9f9f9;
  min-width: 160px;
  box-shadow: 0 8px 16px rgba(0,0,0,0.2);
  z-index: 1;
}

.dropdown-content a {
  color: black;
  padding: 12px 16px;
  text-decoration: none;
  display: block;
}

.dropdown-content a:hover {
  background-color: #F98E00;
}

.dropdown:hover .dropdown-content {
  display: block;
}

/* Content area */
.content {
  flex: 1;
  background-color: #f4f4f4;
  display: flex;
  justify-content: center;
  width: 100%;
}

/* Links in main content and footer (header nav keeps white / dropdown black) */
.content a:link,
.content a:visited,
footer a:link,
footer a:visited {
  color: #00A64D;
}
.content a:hover,
footer a:hover {
  color: #008f44;
}

/* Sticky footer */
footer {
  background-color: #f4f4f4;
  color: #000;
  text-align: center;
  padding: 10px;
  width: 100%;
}
/* end layout */

/* Default primary buttons (green). Excludes .btn-icon / .btn-delete; nav uses type="button". */
button[type="submit"]:not(.btn-icon):not(.btn-delete) {
  border: 1px solid #00A64D;
  border-radius: 5px;
  background-color: #00A64D;
  color: #fff;
  font-size: 16px;
  cursor: pointer;
  font-family: inherit;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
}
button[type="submit"]:not(.btn-icon):not(.btn-delete):hover {
  background-color: #F98E00;
  border-color: #F98E00;
}

.error-message,
.warning-message {
  background-color: #fff4e5;
  color: #f98e00;
  text-align: center;
  padding: 12px;
  margin-bottom: 20px;
  border-radius: 5px;
  font-weight: bold;
  border: 1px solid #f98e00;
}

.success-message {
  background-color: #e8f5ed;
  color: #0d6b3d;
  text-align: center;
  padding: 12px;
  margin-bottom: 20px;
  border-radius: 5px;
  font-weight: bold;
  border: 1px solid #00a64d;
}

/* NOVADS dropdown */
#novadsSelect .selected {
	width: 100%;
    padding: 9px;
    margin: 10px 0;
    border-radius: 5px;
    border: 1px solid #ccc;
    box-sizing: border-box;
    background: #fff;
    cursor: pointer;
}

#novadsSelect .options {
	position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    border: 1px solid #ccc;
    background: #fff;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    z-index: 10;
}

#novadsSelect .options input {
	width: 100%;
    box-sizing: border-box;
    padding: 8px;
    border: none;
    border-bottom: 1px solid #ccc;
}

#novadsSelect .options div:hover {
  background-color: #f0f0f0;
}

#novadsSelect .options div {
	padding: 8px;
    cursor: pointer;
}

.custom-select {
    position: relative;
}
/*end NOVADS dropdown */

/* custom for client form */
.client-form {
  max-width: 800px;
  border-radius: 8px;
}

.client-form h3 {
  margin-bottom: 20px;
}

.client-form legend {
  font-weight: bold;
  padding: 0 10px;
  color: #F98E00;
}

.search-container input[type="text"],
.search-container input[type="date"],
.search-container select,
.search-container div[class="selected"],
.reservation-group-form input[type="text"],
.reservation-group-form input[type="date"],
.reservation-group-form select,
.reservation-group-form div[class="selected"],
.client-form input[type="text"],
.client-form input[type="date"],
.client-form input[type="email"],
.client-form select {
  width: 100%;
  padding: 10px;
  margin: 10px 0;
  border-radius: 5px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

.client-form input[type="radio"] {
  padding: 10px;
  margin: 10px 8px;
  border-radius: 5px;
  border: 1px solid #ccc;
  box-sizing: border-box;
}

.client-form .form-actions {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
  margin-bottom: 20px;
}

.client-form .form-actions a {
  text-decoration: none;
  color: #00A64D;
  font-weight: bold;
}

.client-form .form-actions button,
.new-reservation button {
  width: fit-content;
  max-width: 100%;
  padding: 10px 24px;
  margin-top: 20px;
}

.new-reservation {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 50px;
  min-width: 800px;
}


 .new-reservation a {
	text-decoration: none;
	text-align: center;
	font-weight: 400;
 }

.client-form .form-actions button:hover,  .new-reservation a:hover {
  background-color: #F98E00;
}

.inline-inputs {
  display: flex;
  align-items: center;
  gap: 10px;
}

.inline-inputs input[type="text"] {
  flex: 1;
}

.inline-inputs .dash {
  font-size: 18px;
  margin: 0 5px;
}

.city-index-row {
  display: flex;
  gap: 15px;
  align-items: flex-start;
}
.city-index-row .city-index-col {
  display: flex;
  flex-direction: column;
}
.city-index-row .city-index-col:first-child {
  flex: 1;
}
.city-index-row .city-index-col:last-child {
  width: 150px;
}

#juridiskaContainer {
  margin-top: 20px;
}

.bottomgap {
	margin-bottom: 30px;
}

.bottomgapsmall {
	margin-bottom: 10px;
}

.bottomgapmiddle {
	margin-bottom: 15px;
}

.topgapmiddle {
	margin-top: 15px;
}

.startgapsmall {
	margin-top: 10px;
}

.topgap {
	margin-top: 30px;
}
/* end custom for client form */

/* Two-column layout for form */
.form-columns {
  display: flex;
  gap: 40px;
  flex-wrap: wrap;
}

.form-column {
  flex: 1;
  min-width: 300px;
}

.form-column.left,
.form-column.right {
  display: flex;
  flex-direction: column;
}
/* End two-column layout for form */

/* client */
.inline-id-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

.inline-pase-row {
  display: flex;
  gap: 10px;
  align-items: center;
}

#dzimums {
  display: flex;
  gap: 20px;
  align-items: center;
}
/* end client */

input::placeholder {
  text-transform: none;
}

/* reservations */
.inline-inputs {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
}

.inline-inputs input {
    width: calc(50% - 10px);
    margin: 0;
}

.dash {
    font-size: 18px;
    margin: 0 5px;
}

.search-container button {
	margin-bottom: 20px;
	margin-top: 20px;
	width: fit-content;
	max-width: 100%;
	padding: 8px 20px;
	display: block;
	margin-left: auto;
	margin-right: auto;
	border: none;
	border-radius: 5px;
	background-color: #00A64D;
	color: white;
	font-size: 16px;
	cursor: pointer;
}

/* Same sizing as .client-form .form-actions button (not full-width like search Meklēt) */
.reservation-group-form button {
	margin-bottom: 20px;
	width: fit-content;
	max-width: 100%;
	padding: 10px 24px;
	margin-top: 20px;
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.search-container {
	width: 25%;
	min-width: 468px;
}

/* Reservation new / edit: group picker (not a search form) */
.reservation-group-form {
	width: 50%;
	min-width: 468px;
}

.reservation-group-form > h3.doublegap,
.reservation-group-form .reservation-heading.doublegap h3.reservation-heading__title {
	margin-bottom: 1.75rem;
	margin-top: 0;
	font-size: 1em;
	font-weight: 400;
	line-height: inherit;
}

.reservation-heading__client {
	font-weight: 600;
	font-size: 1em;
	line-height: 1.3;
	margin-bottom: 0.35rem;
}

.reservation-heading__client-link {
	color: inherit;
	text-decoration: underline;
	text-decoration-color: rgba(0, 0, 0, 0.35);
}

.reservation-heading__client-link:hover {
	text-decoration-color: currentColor;
}

.reservation-client-name {
	margin-bottom: 1rem;
}

/* Framed read-only block (e.g. selected group on edit) */
.reservation-control-group {
	border: 1px solid #ddd;
	border-radius: 6px;
	background: #f5f5f5;
	padding: 12px 14px;
	margin: 0 0 1.25rem 0;
}

.reservation-control-group__label {
	font-size: 0.85rem;
	font-weight: 600;
	color: #555;
	margin-bottom: 6px;
	text-transform: uppercase;
	letter-spacing: 0.02em;
}

.reservation-control-group__value {
	font-size: 1rem;
	line-height: 1.4;
	color: #222;
}

.reservation-control-group__sublabel {
	display: block;
	font-size: 0.85rem;
	font-weight: 600;
	color: #555;
	margin: 10px 0 4px;
}

.reservation-inline-row {
	display: flex;
	gap: 12px;
}

.reservation-inline-row__item {
	flex: 1 1 0;
	min-width: 0;
}

.reservation-hotel-surcharge {
	margin-top: 10px;
	font-size: 0.92rem;
	color: #444;
}

.reservation-payment-balance {
	font-weight: 600;
	font-size: 1.1rem;
}

.reservation-payment-links {
	margin-top: 12px;
	padding-top: 12px;
	border-top: 1px solid #ddd;
}

/* Home page: smaller Meklēt buttons */
.home-search-container button {
	width: fit-content;
	max-width: 100%;
	padding: 8px 20px;
	display: block;
	margin-left: auto;
	margin-right: auto;
}

.date-row {
  display: flex;
  gap: 10px;
}

.gap {
	margin-top: 30px;
}

.doublegap {
	margin-top: 50px;
}

.custom-select {
    position: relative;
}

.selected {
    padding: 10px;
    border: 1px solid #ccc;
    background: #fff;
    cursor: pointer;
}

.options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    border: 1px solid #ccc;
    background: #fff;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    z-index: 10;
}

.options input {
    width: 100%;
    box-sizing: border-box;
    padding: 8px;
    border: none;
    border-bottom: 1px solid #ccc;
}

.options div {
    padding: 8px;
    cursor: pointer;
}

.options div:hover {
    background-color: #f0f0f0;
}

.searchable-select {
    position: relative;
	margin-bottom: 20px;
}

/* Reservation new (group list) page: wide container and list */
.reservation-new-form {
	width: 100%;
	max-width: 1000px;
}
.reservation-new-form .searchable-select {
	width: 100%;
	max-width: 1000px;
}
.reservation-new-form button {
	display: block;
	margin-left: auto;
	margin-right: auto;
	width: fit-content;
	max-width: 100%;
	padding: 10px 24px;
}

.searchable-selected {
    width: 100%;
    padding: 10px;
    margin: 10px 0;
    border-radius: 5px;
    border: 1px solid #ccc;
    box-sizing: border-box;
    background: #fff;
    cursor: pointer;
}

.searchable-options {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    border: 1px solid #ccc;
    background: #fff;
    max-height: 200px;
    overflow-y: auto;
    display: none;
    z-index: 10;
}

.searchable-options input {
    width: 100%;
    box-sizing: border-box;
    padding: 8px;
    border: none;
    border-bottom: 1px solid #ccc;
}

.searchable-options div {
    padding: 5px 8px;
    cursor: pointer;
}

.searchable-options div:hover {
    background-color: #f0f0f0;
}
/* end reservations */

/* reservation list */
.assignment-list {
  width: 100%;
  margin-top: 30px;
}

.styled-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  font-size: 14px;
  margin-bottom: 50px;
}

.styled-table th,
.styled-table td {
  padding: 12px 15px;
  border: 1px solid #ddd;
  text-align: left;
}

.styled-table thead {
  background-color: #F98E00;
  color: white;
}

.styled-table tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

.styled-table tbody tr:hover {
  background-color: #ffe5cc;
}

.assignment-list.narrow {
  margin-top: 30px;
  width: fit-content;
}

.centered-heading {
  text-align: center;
  margin-bottom: 20px;
}

.clickable-table tbody tr {
  cursor: pointer;
}

.clickable-table tbody tr:hover {
  background-color: #ffe5cc;
}

.styled-table td.centered {
  text-align: center;
}

.page-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.group-link a {
  font-size: 14px;
  color: #00A64D;
  text-decoration: none;
  font-weight: bold;
}

.group-link a:hover {
  color: #F98E00;
}

.payment-links{
  display: flex;
  flex-direction: column;
  width: fit-content;
  gap : 20px;
}
/* end reservation list */

/* login */
.login-container {
	background-color: #fff;
	padding: 40px;
	border-radius: 10px;
	box-shadow: 0 4px 10px rgba(0,0,0,0.1);
	text-align: center;
	width: 350px;
}

.login-container img {
	margin-bottom: 0px;
}

.login-container h1 {
	font-size: 20px;
	margin-bottom: 30px;
}

.login-container input[type="email"],
.login-container input[type="password"] {
	width: 100%;
	padding: 10px;
	margin: 10px 0;
	border-radius: 5px;
	border: 1px solid #ccc;
	box-sizing: border-box;
}

.login-container button {
	width: fit-content;
	max-width: 100%;
	padding: 10px;
	margin-top: 20px;
	margin-left: auto;
	margin-right: auto;
	display: block;
}

.login-container .error-message {
	background-color: transparent;
	padding: 0;
	margin-bottom: 12px;
	border: none;
	border-radius: 0;
	font-size: 13px;
	font-weight: normal;
}
/* end login */

/* group list */
.assignment-list {
  width: 100%;
  margin-top: 30px;
}

.styled-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  font-size: 14px;
  margin-bottom: 50px;
}

.styled-table th,
.styled-table td {
  padding: 12px 15px;
  border: 1px solid #ddd;
  text-align: left;
}

.styled-table thead {
  background-color: #F98E00;
  color: white;
}

.styled-table tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

.styled-table tbody tr:hover {
  background-color: #ffe5cc;
}

.assignment-list.narrow {
  width: 98%;
  margin-top: 30px;
}
.centered-heading {
  text-align: center;
  margin-bottom: 20px;
}

.clickable-table tbody tr {
  cursor: pointer;
}

.clickable-table tbody tr:hover {
  background-color: #ffe5cc;
}

.styled-table td.centered {
  text-align: center;
}

.page-container {
  display: flex;
  flex-direction: column;
  align-items: center;
}

.group-link a {
  font-size: 14px;
  color: #00A64D;
  text-decoration: none;
  font-weight: bold;
}

.group-link a:hover {
  color: #F98E00;
}
/* end group list */

/* interesenti */
.table-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 20px;
}

.table-block {
  width: 100%;
  max-width: 1300px;
  margin-bottom: 40px;
}

.table-block h3 {
  text-align: center;
  margin-bottom: 15px;
  font-size: 20px;
  color: #333;
}

.styled-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  font-size: 14px;
}

.styled-table th,
.styled-table td {
  padding: 10px 12px;
  border: 1px solid #ddd;
  text-align: left;
  vertical-align: middle;
}

.styled-table th {
  padding: 10px 12px;
  border: 1px solid #ddd;
  text-align: center;
  vertical-align: middle;
}

.styled-table thead {
  background-color: #F98E00;
  color: white;
}

.styled-table tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

.styled-table tbody tr:hover {
  background-color: #ffe5cc;
}

.action-buttons a {
  margin-right: 5px;
  text-decoration: none;
  font-size: 16px;
  color: #007BFF;
}

.action-buttons a:hover {
  color: #F98E00;
}

.group-header {
  text-align: center;
  margin-bottom: 30px;
}

.group-title {
  font-size: 22px;
  font-weight: bold;
  color: #333;
  margin-bottom: 10px;
}

.group-dates {
  font-size: 16px;
  color: #666;
  margin-bottom: 10px;
}

.group-link a {
  font-size: 14px;
  color: #00A64D;
  text-decoration: none;
  font-weight: bold;
}

.group-link a:hover {
  color: #F98E00;
}

input[type="text"],
input[type="email"], textarea {
  width: 100%;
  padding: 6px;
  font-size: 14px;
  border: 1px solid #ccc;
  border-radius: 4px;
}
.edit-form {
  display: inline-block;
  width: 100%;
}
.edit-form input, .edit-form textarea {
  background-color: #fff;
}

.btn-save {
  background: none;
  border: none;
  color: #28a745;
  font-size: 16px;
  padding: 4px 8px;
  cursor: pointer;
}

.btn-save:hover {
  color: #218838;
}

.btn-icon {
  background: none;
  border: none;
  font-size: 16px;
  padding: 4px 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.btn-save {
  color: #28a745;
}

.btn-save:hover {
  color: #218838;
}

.btn-delete {
  color: #dc3545;
}

.btn-delete:hover {
  color: #c82333;
}

.btn-add {
  background: none;
  border: none;
  color: #007bff;
  font-size: 16px;
  padding: 4px 8px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.btn-add:hover {
  color: #0056b3;
}

.action-buttons {
  width: 80px;
  text-align: center;
  vertical-align: middle;
  padding: 0;
}

.btn-icon {
  background: none;
  border: none;
  font-size: 16px;
  padding: 4px;
  margin: 0 2px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.btn-save { color: #28a745; }
.btn-save:hover { color: #218838; }

.btn-delete { color: #dc3545; }
.btn-delete:hover { color: #c82333; }

.btn-add { color: #007bff; }
.btn-add:hover { color: #0056b3; }

.action-buttons {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 6px;
  width: 80px;
  padding: 0;
}
/* end interesenti */

/* single group */
.table-container {
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 100%;
  padding: 20px;
}

.table-block {
  width: 100%;
  max-width: 700px;
  margin-bottom: 40px;
}

.table-block h3 {
  text-align: center;
  margin-bottom: 15px;
  font-size: 20px;
  color: #333;
}

.styled-table {
  width: 100%;
  border-collapse: collapse;
  background-color: #fff;
  box-shadow: 0 2px 5px rgba(0,0,0,0.1);
  font-size: 14px;
}

.styled-table th,
.styled-table td {
  padding: 12px 15px;
  border: 1px solid #ddd;
  text-align: left;
}

.styled-table thead {
  background-color: #F98E00;
  color: white;
}

.styled-table tbody tr:nth-child(even) {
  background-color: #f9f9f9;
}

.styled-table tbody tr:hover {
  background-color: #ffe5cc;
}

.group-header {
  text-align: center;
  margin-bottom: 30px;
}

.group-title {
  font-size: 22px;
  font-weight: bold;
  color: #333;
  margin-bottom: 10px;
}

.group-dates {
  font-size: 16px;
  color: #666;
  margin-bottom: 10px;
}

.group-link a {
  font-size: 14px;
  color: #00A64D;
  text-decoration: none;
  font-weight: bold;
}

.group-link a:hover {
  color: #F98E00;
}
/* end single group */

/* checkboxes start */
/* Custom checkbox */
.styled-checkbox {
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    margin: 10px 0;
    user-select: none;
}

.styled-checkbox input[type="checkbox"] {
    display: none;
}

.styled-checkbox .checkmark {
    width: 20px;
    height: 20px;
    border: 1px solid #ccc;
    border-radius: 4px;
    background: #fff;
    position: relative;
    transition: all 0.2s ease;
}

.styled-checkbox input[type="checkbox"]:checked + .checkmark {
    background-color: #F98E00;
    border-color: #F98E00;
}

.styled-checkbox input[type="checkbox"]:checked + .checkmark::after {
    content: "";
    position: absolute;
    left: 6px;
    top: 2px;
    width: 5px;
    height: 10px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.styled-checkbox .label-text {
    font-size: 14px;
    color: #333;
}
/* checkboxes end */
