/* General styles */
html,
body {
    height: 100%;
    margin: 0;
    padding: 0;

}

/* Screen styles */
.screen {
    display: none;
    height: 100vh;
    width: 100%;
    position: absolute;
    top: 0;
    left: 0;
    background-color: #f8f9fa;
    opacity: 0;
    transition: opacity 0.3s ease-in-out;
    visibility: hidden;
}

.screen.active {
    display: flex;
    flex-direction: column;
    opacity: 1;
    visibility: visible;
}

.header {
    flex: 0 0 56px;
    background-color: #343a40;
    color: white;
    padding: 0.15rem 0rem 0.15rem 1rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    z-index: 1000;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.header h2 {
    font-size: 1.5rem;
    font-weight: 500;
    margin: 0;
}

.header-logo {
    max-height: 60px;
    max-width: 200px;
    object-fit: contain;
}

.screen-content {
    flex: 1;
    overflow-y: auto;
    padding: 0.25rem;
}

.footer {
    flex: 0 0 60px;
    background-color: #f8f9fa;
    border-top: 1px solid #dee2e6;
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    z-index: 1000;
}

/* Adjust content area to account for header */
.screen>div:not(.header) {
    height: calc(100vh - 16px);
    /* 56px is the header height */
    margin-top: 16px;
}

/* Form styles */
.form-control {
    border-radius: 0.25rem;
    border: 1px solid #ced4da;
    padding: 0.5rem 0.75rem;
}

.form-control:focus {
    border-color: #80bdff;
    box-shadow: 0 0 0 0.2rem rgba(0, 123, 255, 0.25);
}

/* Card styles */
.card {
    border: none;
    border-radius: 0.5rem;
}

.card-body {
    padding: 2rem;
}

/* Utility classes */
.gap-3 {
    gap: 1rem;
}

/* Button styles */
.btn {
    border-radius: 0.25rem;
    padding: 0.5rem 1rem;
    font-weight: 500;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .col-md-6 {
        height: 50vh;
    }

    .header h2 {
        font-size: 1.25rem;
    }
}

/* Scrollbar styles */
.overflow-auto::-webkit-scrollbar {
    width: 8px;
}

.overflow-auto::-webkit-scrollbar-track {
    background: #f1f1f1;
}

.overflow-auto::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.overflow-auto::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* Address suggestions styles */
#addressSuggestions {
    max-height: 200px;
    overflow-y: auto;
    border: 1px solid #ced4da;
    border-radius: 0.25rem;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    background-color: white;
}

#addressSuggestions .list-group-item {
    border: none;
    border-bottom: 1px solid #eee;
    padding: 0.5rem 1rem;
    cursor: pointer;
}

#addressSuggestions .list-group-item:last-child {
    border-bottom: none;
}

#addressSuggestions .list-group-item:hover {
    background-color: #f8f9fa;
}

/* Visit rows styles */
#rightForm {
    padding-right: 25px;
    /* Standard scrollbar width */
}

.visit-row {
    background-color: #fff;
    transition: all 0.3s ease;
    padding: 0.35rem;
    border: 1px solid #fff;
    border-radius: 0.25rem;
    margin-bottom: 0.5rem;
}

.visit-row:hover {
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.visit-row.visit-row-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.1rem rgba(220, 53, 69, 0.2);
}

.visit-row .row-content {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.visit-row .date-field {
    flex: 1;
    min-width: 0;
    position: relative;
    z-index: 1;
    /* Prevents flex item from overflowing */
}

/* Keep bootstrap-datepicker above neighbours; body-appended picker uses high z-index */
.datepicker {
    z-index: 2050 !important;
}

.visit-row .checkbox-group {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.visit-row .ticket-price-field {
    flex: 0 0 150px;
    flex-shrink: 0;
}

.visit-row .ticket-price-field input {
    width: 100%;
}

.visit-row .remove-button {
    flex-shrink: 0;
    width: 30px;
}

.remove-row {
    width: 30px !important;
    height: 30px !important;
    padding: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    transition: all 0.2s ease;
    background-color: #0d6efd !important;
    border-color: #0d6efd !important;
}

.remove-row:hover {
    background-color: #092247 !important;
    border-color: #092247 !important;
    transform: scale(1.1);
}

.remove-row i {
    color: white !important;
    font-size: 0.875rem;
}

.visit-row .form-check {
    margin-bottom: 0.5rem;
}

.visit-row .form-check:last-child {
    margin-bottom: 0;
}

/* Form screen specific styles */
#formScreen .row {
    height: 100%;
}

#formScreen .col-md-6 {
    height: 100%;
}

#formScreen .col-md-6:first-child {
    overflow: hidden;
}

#formScreen .col-md-6:last-child {
    overflow-y: auto;
}

.left-form-column {
    display: flex;
    flex-direction: column;
    min-height: 0;
    height: 100%;
}

.left-form-column-main {
    flex: 1 1 auto;
    min-height: 0;
}

.manual-rows-container {
    flex: 0 0 auto;
    margin-top: auto;
    padding-top: 1rem;
    font-size: 0.9rem;
    line-height: 1.45;
    color: #495057;
    border-top: 1px solid #dee2e6;
}

.manual-rows-container p {
    margin-bottom: 0.35rem;
}

.manual-rows-container p:last-child {
    margin-bottom: 0;
}

.manual-rows-container strong {
    font-weight: 600;
}

.submit-container .btn {
    min-width: 120px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}