.parking-lot {
    display: flex;
    justify-content: center;
    align-items: center;
    margin-top: 20px;
    position: relative;
    margin: 20px auto;
    max-width: 600px; /* Restore original value */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    position: relative;
}

.label.left {
    position: absolute;
    top: 17px;
}

/* Styling for the second row of parking spaces */
.parking-lot.second-row {
    justify-content: flex-start; /* Align to the left */
    margin-top: 10px;
}

.labels {
    display: flex;
    width: auto;
    height: auto;
    flex-shrink: 0; /* Prevent labels from shrinking */
}

.label {
    font-weight: bold;
    text-align: center;
    display: flex;
    align-items: center;
    justify-content: center;
    color: black;
    
    /* Use a more compatible approach for vertical text */
    -webkit-transform: rotate(90deg);
    -moz-transform: rotate(90deg);
    -ms-transform: rotate(90deg);
    transform: rotate(90deg);
    -webkit-transform-origin: center center;
    -moz-transform-origin: center center;
    -ms-transform-origin: center center;
    transform-origin: center center;
    
    white-space: nowrap;
    letter-spacing: 0.1em; /* Reduce letter spacing */
    padding: 4px; /* Reduce padding */
    width: 15px; /* Fixed width for the label */
    margin: 0; /* Remove margin */
}

.parking-spaces {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    flex-direction: column;
    opacity: 1;
    -webkit-transition: opacity 0.3s ease;
    transition: opacity 0.3s ease;
    padding-left: 15px;
}

/* Style for the additional row of parking spaces */
.parking-spaces.additional-row {
    -webkit-box-pack: start;
    -webkit-justify-content: flex-start;
    justify-content: flex-start;
    margin-top: 10px;
}

.parking-row {
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-orient: horizontal;
    -webkit-box-direction: normal;
    -webkit-flex-direction: row;
    flex-direction: row;
    -webkit-flex-wrap: nowrap;
    flex-wrap: nowrap;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    margin-bottom: 10px;
}

.parking-space.empty-placeholder {
    border: none;
    background-color: transparent;
    cursor: default;
}

.parking-spaces.loaded {
    opacity: 1;
}

.parking-space {
    border: 1px solid #ccc;
    height: 150px;
    width: 65px; /* Fixed width */
    display: -webkit-box;
    display: -webkit-flex;
    display: flex;
    -webkit-box-orient: vertical;
    -webkit-box-direction: normal;
    -webkit-flex-direction: column;
    flex-direction: column;
    -webkit-box-pack: center;
    -webkit-justify-content: center;
    justify-content: center;
    -webkit-box-align: center;
    -webkit-align-items: center;
    align-items: center;
    font-size: 24px;
    cursor: pointer;
    transition: all 0.3s ease;
    /* Add horizontal margin to replace gap property */
    margin: 5px; /* Apply equal margin on all sides */
    text-align: center;
    box-sizing: border-box;
    position: relative;
    padding-bottom: 30px; /* Make room for the button */
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    /* Add explicit ratio enforcement for iOS */
    min-width: 65px;
    max-width: 65px;
    min-height: 150px;
}

/* Special iOS 10 specific styling */
@media screen and (-webkit-min-device-pixel-ratio: 0) {
    .parking-space {
        width: 65px !important;
        height: 150px !important;
        min-width: 65px !important;
        min-height: 150px !important;
        max-width: 65px !important;
        max-height: 150px !important;
        -webkit-box-sizing: border-box !important;
        box-sizing: border-box !important;
    }
}

.parking-space.empty {
    background-color: #d4edda;
}

.parking-space.occupied {
    background-color: #f8d7da;
}

.parking-space.reserved {
    background-color: #ffeeba;
    cursor: not-allowed;
}

.reserve-btn {
    position: absolute;
    bottom: 5px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 12px;
    display: block; /* Always display the button */
    z-index: 1; /* Ensure button is clickable */
}

/* Remove or comment out this rule as it causes iOS issues */
/* .parking-space:hover .reserve-btn {
    display: block;
} */

.parking-space.reserved .reserve-btn {
    display: block;
    background-color: #dc3545;
    color: white;
}

/* Align Ingang to the right */
.parking-lot > div:first-child {
    text-align: right;
}

/* Align Poort to the left */
.parking-lot > div:last-child {
    text-align: left;
}

.phone-form {
    max-width: 400px;
    margin: 0 auto;
}

.phone-form input[type="tel"] {
    font-size: 1.1em;
    padding: 10px;
}

/* The switch - the box around the slider */
.switch {
  position: relative;
  display: inline-block;
  width: 60px;
  height: 34px;
}

/* Hide default HTML checkbox */
.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

/* The slider - the moving part */
.slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background-color: #ccc;
  transition: .4s;
}

.slider:before {
  position: absolute;
  content: "";
  height: 26px;
  width: 26px;
  left: 4px;
  bottom: 4px;
  background-color: white;
  transition: .4s;
}

input:checked + .slider {
  background-color: #2196F3;
}

input:focus + .slider {
  box-shadow: 0 0 1px #2196F3;
}

input:checked + .slider:before {
  transform: translateX(26px);
}

/* Rounded sliders */
.slider.round {
  border-radius: 34px;
}

.slider.round:before {
  border-radius: 50%;
}

#wakelockToggle {
    padding: 8px 16px;
    border-radius: 20px;
    transition: all 0.3s ease;
}

#wakelockToggle.btn-primary {
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.ios-install {
    background-color: #007AFF;
    color: white;
    padding: 12px 20px;
    border-radius: 8px;
    font-size: 16px;
}

.ios-install img {
    vertical-align: middle;
    margin: 0 4px;
}

#installContainer {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 1000;
    width: 90%;
    max-width: 400px;
    display: none;
}

/* Ensure the list takes 100% of the screen width */
#numbersList {
    width: 100%;
}

.list-group-item {
    padding: 0.25rem 0.25rem !important;
}

#numbersList .list-group-item {
    padding: 0.25rem 0.25rem !important;
    margin-bottom: 0.25rem;
}

#numbersList .form-row {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.form-group {
    margin-bottom: 0px !important;
}

.form-group.col-md-2 {
    padding: 0; /* Removes all padding */
}

.form-row.justify-content-center {
    font-size: 0;
  }
  
  .form-row.justify-content-center .form-group input {
    font-size: 16px; /* Or your desired font size */
  }

.form-row.justify-content-center.align-items-center .form-group {
    margin-bottom: 0 !important;
}
  
#numbersList .form-group {
    margin: 0;
    padding: 0;
}

#numbersList .form-group:not(:nth-last-child(-n+2)) {
    flex: 1;
}

#numbersList .form-group:nth-last-child(-n+2) {
    flex: 0 0 auto;
}

#numbersList .form-control {
    height: 31px;
}

/* Fixed width buttons */
#numbersList .btn-danger,
#numbersList .silent-mode-btn {
    width: 95px !important;
    min-width: 95px !important;
    max-width: 95px !important;
    height: 31px !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
}

/* Action buttons */
.btn-danger,
.silent-mode-btn {
    width: 100%;
    height: 31px;
    padding: 0;
    margin: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* Button states */
.silent-mode-btn.btn-success,
.silent-mode-btn:hover,
.btn-danger:hover {
    opacity: 0.9;
}

#loadingIndicator {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
}

#loadingIndicator.hidden {
    display: none;
}

#loadingIndicator {
    text-align: center;
    margin: 15px 0;
}

.loading-dots {
    display: inline-block;
    width: 10px;
    height: 10px;
    margin: 0 5px;
    background-color: #007bff;
    border-radius: 50%;
    -webkit-animation: blink 1.4s infinite;
    animation: blink 1.4s infinite;
}

.loading-dots:nth-child(2) {
    -webkit-animation-delay: 0.2s;
    animation-delay: 0.2s;
}

.loading-dots:nth-child(3) {
    -webkit-animation-delay: 0.4s;
    animation-delay: 0.4s;
}

@-webkit-keyframes blink {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
}

@keyframes blink {
    0%, 100% { opacity: 0.2; }
    50% { opacity: 1; }
}

/* Open Poort button styles */
#openPoortButton {
  font-size: 1.2em;
}
#openPoortButton .open-icon {
  font-size: 1.3em;
}
/* PIN modal styles */
#poortPinInput {
  font-size: 2em;
  letter-spacing: 0.5em;
  display: flex;
  justify-content: center;
  margin-bottom: 1rem;
}
/* Pin pad button styles */
#pinPad .btn {
  width: 60px;
  height: 60px;
  margin: 5px;
  font-size: 1.5em;
}
#pinPad .btn-warning span {
  font-size: 1.2em;
}
/* Hide activity log container by default */
#activityLogContainer {
  display: none;
}

.list-group-item-primary {
  color: #fff;
  background-color: #007bff;
  border-color: #007bff;
}

