/* Malvern View Transport - Custom Styles */

:root {
    --primary-color: #0d6efd;
    --primary-hover: #0b5ed7;
    --background-gradient: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --card-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
}

body {
    background: var(--background-gradient);
    min-height: 100vh;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    padding: 1rem 0;
}

.container {
    max-width: 1200px;
}

header {
    color: white;
    text-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);
}

header h1 {
    font-weight: 700;
    margin-bottom: 0.5rem;
}

header .lead {
    color: rgba(255, 255, 255, 0.9);
    text-shadow: 1px 1px 2px rgba(0, 0, 0, 0.2);
}

.card {
    border: none;
    border-radius: 1rem;
    box-shadow: var(--card-shadow);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 1rem 2rem rgba(0, 0, 0, 0.2);
}

.card-title {
    color: #333;
    font-weight: 600;
}

/* Form Styling */
.form-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
}

.form-control,
.form-select {
    border-radius: 0.5rem;
    border: 1px solid #ced4da;
    padding: 0.75rem;
    transition: border-color 0.15s ease-in-out, box-shadow 0.15s ease-in-out;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-control.is-invalid,
.form-select.is-invalid {
    border-color: #dc3545;
    background-image: none;
}

.form-control.is-valid,
.form-select.is-valid {
    border-color: #198754;
    background-image: none;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* Button Styling */
.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
    border-radius: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    border-color: var(--primary-hover);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Alert Styling */
.alert {
    border-radius: 0.5rem;
    border: none;
}

.alert-success {
    background-color: #d1e7dd;
    color: #0f5132;
}

.alert-danger {
    background-color: #f8d7da;
    color: #842029;
}

/* Character Counter */
#charCount {
    font-weight: 600;
    color: var(--primary-color);
}

.text-danger {
    color: #dc3545 !important;
}

/* Responsive Design */
@media (max-width: 576px) {
    body {
        padding: 0.5rem 0;
    }

    header h1 {
        font-size: 2rem;
    }

    .card-body {
        padding: 1.5rem !important;
    }

    .btn-lg {
        padding: 0.625rem 1.25rem;
        font-size: 1rem;
    }
}

@media (min-width: 768px) {
    .card-body {
        padding: 2.5rem !important;
    }
}

/* Accessibility */
.form-control:focus-visible,
.form-select:focus-visible,
.btn:focus-visible {
    outline: 2px solid var(--primary-color);
    outline-offset: 2px;
}

/* Loading State */
.btn-primary:disabled {
    cursor: not-allowed;
    opacity: 0.65;
}

/* Print Styles */
@media print {
    body {
        background: white;
    }

    .btn,
    .alert {
        display: none;
    }
}

/* Additional Icon Styling */
.bi {
    vertical-align: middle;
}

/* Small Text Enhancements */
small.text-muted {
    display: block;
    margin-top: 0.25rem;
}

.form-text {
    display: block;
    margin-top: 0.5rem;
    font-size: 0.875rem;
}
/* Time Picker Styles */
.time-picker-dropdown {
    position: absolute;
    z-index: 1050;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    margin-top: 0.25rem;
    min-width: 280px;
}

.time-picker-header {
    padding: 0.75rem 1rem;
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    border-radius: 0.5rem 0.5rem 0 0;
    text-align: center;
}

.time-picker-body {
    display: flex;
    padding: 1rem;
    gap: 1rem;
}

.time-picker-column {
    flex: 1;
    text-align: center;
}

.time-picker-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
}

.time-picker-scroll {
    height: 200px;
    overflow-y: auto;
    border: 1px solid #dee2e6;
    border-radius: 0.375rem;
    background: #f8f9fa;
}

.time-option {
    padding: 0.5rem;
    cursor: pointer;
    transition: background-color 0.15s ease;
}

.time-option:hover {
    background-color: #e9ecef;
}

.time-option.selected {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

.time-picker-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: flex-end;
    gap: 0.5rem;
}

#timePickerBtn {
    border-color: #ced4da;
}

#timePickerBtn:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}

/* Date Picker Styles */
.date-picker-dropdown {
    position: absolute;
    z-index: 1050;
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 0.5rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15);
    margin-top: 0.25rem;
    min-width: 320px;
}

.date-picker-header {
    padding: 0.75rem 1rem;
    background: var(--primary-color);
    color: white;
    font-weight: 600;
    border-radius: 0.5rem 0.5rem 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.date-nav-btn {
    background: transparent;
    border: none;
    color: white;
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem 0.75rem;
    border-radius: 0.25rem;
    transition: background-color 0.15s ease;
}

.date-nav-btn:hover {
    background-color: rgba(255, 255, 255, 0.2);
}

.date-picker-body {
    padding: 1rem;
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #6c757d;
    font-size: 0.875rem;
    text-align: center;
}

.weekdays div {
    padding: 0.5rem;
}

.days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 0.25rem;
}

.day-cell {
    padding: 0.5rem;
    text-align: center;
    cursor: pointer;
    border-radius: 0.25rem;
    transition: background-color 0.15s ease;
    font-size: 0.875rem;
}

.day-cell:hover:not(.disabled):not(.other-month) {
    background-color: #e9ecef;
}

.day-cell.selected {
    background-color: var(--primary-color);
    color: white;
    font-weight: 600;
}

.day-cell.today {
    border: 2px solid var(--primary-color);
}

.day-cell.disabled {
    color: #adb5bd;
    cursor: not-allowed;
}

.day-cell.other-month {
    color: #adb5bd;
    cursor: default;
}

.date-picker-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid #dee2e6;
    display: flex;
    justify-content: space-between;
    gap: 0.5rem;
}

#datePickerBtn {
    border-color: #ced4da;
}

#datePickerBtn:hover {
    background-color: #e9ecef;
    border-color: #adb5bd;
}
