:root {
    --register-past-trip-primary-color: #2196F3;
    --register-past-trip-primary-dark: #1976D2;
    --register-past-trip-text-color: #333;
    --register-past-trip-text-light: #666;
    --register-past-trip-background-light: #f8f9fa;
    --register-past-trip-white: #ffffff;
    --register-past-trip-border-color: #eee;
    --register-past-trip-shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.1);
    --register-past-trip-border-radius: 8px;
    --register-past-trip-transition-base: all 0.3s ease;
    --register-past-trip-success-color: #4CAF50;
    --register-past-trip-error-color: #f44336;
    --register-past-trip-warning-color: #ff9800;
    --register-past-trip-premium-color: #FFD700;
    --register-past-trip-premium-gradient: linear-gradient(135deg, #FFD700, #FFA500);
    --register-past-trip-navbar-height: 64px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}


/* Main Content */
.register-past-trip-page-container {
    min-height: calc(100vh - var(--register-past-trip-navbar-height));
    display: flex;
    flex-direction: column;
}

.register-past-trip-main-content {
    flex: 1;
    width: 100%;
    max-width: 600px;
    margin: 0 auto;
    padding: 40px 20px 140px;
}

/* Form Styles */
.register-past-trip-form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.register-past-trip-form-group {
    margin-bottom: 1.5rem;
    margin-top: 1.5rem;
}

.register-past-trip-form-label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--register-past-trip-text-color);
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.9rem;
}

.register-past-trip-form-label i {
    color: var(--register-past-trip-primary-color);
    width: 16px;
    font-size: 0.9rem;
}

.register-past-trip-form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    border: 2px solid var(--register-past-trip-border-color);
    border-radius: var(--register-past-trip-border-radius);
    font-size: 1rem;
    transition: var(--register-past-trip-transition-base);
    background: var(--register-past-trip-background-light);
    font-family: 'Inter', sans-serif;
}

.register-past-trip-form-input:focus {
    outline: none;
    border-color: var(--register-past-trip-primary-color);
    box-shadow: 0 0 0 3px rgba(33, 150, 243, 0.1);
    background: var(--register-past-trip-white);
}

.register-past-trip-form-input.error {
    border-color: var(--register-past-trip-error-color);
    background-color: #fff5f5;
}

.register-past-trip-input-hint {
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: var(--register-past-trip-text-light);
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: var(--register-past-trip-background-light);
    border-radius: var(--register-past-trip-border-radius);
    border: 1px solid var(--register-past-trip-border-color);
}

.register-past-trip-input-hint i {
    color: var(--register-past-trip-primary-color);
    font-size: 0.8rem;
}

/* Passengers Section */
.register-past-trip-passenger-field {
    display: flex;
    align-items: flex-start;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.register-past-trip-autocomplete-wrapper {
    flex: 1;
    position: relative;
}

.register-past-trip-passenger-input {
    flex: 1;
}

.register-past-trip-autocomplete-dropdown {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--register-past-trip-white);
    border: 2px solid var(--register-past-trip-border-color);
    border-top: none;
    border-radius: 0 0 var(--register-past-trip-border-radius) var(--register-past-trip-border-radius);
    max-height: 180px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    box-shadow: var(--register-past-trip-shadow-sm);
}

.register-past-trip-autocomplete-dropdown.show {
    display: block;
}

.register-past-trip-autocomplete-item {
    padding: 0.6rem 0.8rem;
    cursor: pointer;
    transition: var(--register-past-trip-transition-base);
    border-bottom: 1px solid var(--register-past-trip-border-color);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.register-past-trip-autocomplete-item:last-child {
    border-bottom: none;
}

.register-past-trip-autocomplete-item:hover,
.register-past-trip-autocomplete-item.highlighted {
    background: var(--register-past-trip-background-light);
}

.register-past-trip-autocomplete-item.selected {
    background: var(--register-past-trip-primary-color);
    color: var(--register-past-trip-white);
}

.register-past-trip-autocomplete-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    /* background: var(--register-past-trip-primary-color); */
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--register-past-trip-white);
    font-weight: 600;
    font-size: 0.7rem;
    flex-shrink: 0;
}

.register-past-trip-autocomplete-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.register-past-trip-autocomplete-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.register-past-trip-autocomplete-info {
    flex: 1;
    min-width: 0;
}

.register-past-trip-autocomplete-name {
    font-weight: 500;
    margin-bottom: 2px;
    font-size: 0.9rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.register-past-trip-autocomplete-details {
    font-size: 0.75rem;
    color: var(--register-past-trip-text-light);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.register-past-trip-autocomplete-item.selected .register-past-trip-autocomplete-details {
    color: rgba(255, 255, 255, 0.8);
}

/* Plus Button for Adding Passengers */
.register-past-trip-add-passenger-plus {
    background: var(--register-past-trip-primary-color);
    color: var(--register-past-trip-white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--register-past-trip-transition-base);
    flex-shrink: 0;
    font-size: 0.9rem;
}

.register-past-trip-add-passenger-plus:hover {
    background: var(--register-past-trip-primary-dark);
    transform: scale(1.05);
}

.register-past-trip-add-passenger-plus:disabled {
    background: #ccc;
    cursor: not-allowed;
    transform: none;
}

.register-past-trip-remove-passenger {
    background: var(--register-past-trip-error-color);
    color: var(--register-past-trip-white);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--register-past-trip-transition-base);
    flex-shrink: 0;
    font-size: 0.9rem;
}

.register-past-trip-remove-passenger:hover {
    background: #d32f2f;
    transform: scale(1.05);
}

.register-past-trip-passenger-count {
    font-size: 0.85rem;
    color: var(--register-past-trip-text-light);
    font-weight: 500;
    text-align: center;
}

#register-past-trip-passenger-counter {
    color: var(--register-past-trip-primary-color);
    font-weight: 600;
}

/* Hidden class */
.register-past-trip-hidden {
    display: none !important;
}

/* Responsive Design */
@media (max-width: 768px) {
    .register-past-trip-nav-content {
        padding: 0 20px;
    }

    .register-past-trip-main-content {
        padding: 20px 20px 140px;
    }

    .register-past-trip-form-row {
        grid-template-columns: 1fr;
        gap: 0;
        margin-bottom: 0;
    }

    .register-past-trip-form-row .register-past-trip-form-group {
        margin-bottom: 1.2rem;
    }

    h1 {
        font-size: 1.6rem;
    }

    .register-past-trip-subtitle {
        font-size: 0.9rem;
    }

    .register-past-trip-premium-badge {
        font-size: 0.8rem;
        padding: 0.4rem 0.8rem;
    }

    .register-past-trip-form-label {
        font-size: 0.85rem;
    }

    .register-past-trip-form-input {
        padding: 0.7rem 0.9rem;
        font-size: 0.95rem;
    }

    .register-past-trip-textarea {
        min-height: 80px;
    }

    .register-past-trip-input-hint {
        font-size: 0.75rem;
        padding: 0.4rem 0.6rem;
    }

    .register-past-trip-passenger-field {
        gap: 0.5rem;
    }

    .register-past-trip-add-passenger-plus,
    .register-past-trip-remove-passenger {
        width: 36px;
        height: 36px;
        font-size: 0.85rem;
    }

    .register-past-trip-passenger-count {
        font-size: 0.8rem;
    }

    .register-past-trip-footer-content {
        padding: 0.8rem 20px;
        gap: 0.6rem;
    }

    .register-past-trip-cancel-btn,
    .register-past-trip-submit-btn {
        padding: 0.8rem 1rem;
        font-size: 0.85rem;
    }

    .register-past-trip-autocomplete-dropdown {
        max-height: 140px;
    }

    .register-past-trip-autocomplete-item {
        padding: 0.5rem 0.6rem;
    }

    .register-past-trip-autocomplete-name {
        font-size: 0.85rem;
    }

    .register-past-trip-autocomplete-details {
        font-size: 0.7rem;
    }

    .register-past-trip-toast-container {
        top: 16px;
        right: 20px;
        left: 20px;
    }

    .register-past-trip-toast {
        margin: 0 0 0.5rem;
        min-width: auto;
        max-width: none;
        padding: 0.7rem 1rem;
    }
}

@media (max-width: 480px) {
    .register-past-trip-main-content {
        padding: 20px 20px 140px;
    }

    .register-past-trip-nav-content {
        padding: 0 20px;
    }

    h1 {
        font-size: 1.5rem;
    }

    .register-past-trip-subtitle {
        font-size: 0.85rem;
    }

    .register-past-trip-form-input {
        padding: 0.65rem 0.8rem;
        font-size: 0.9rem;
    }

    .register-past-trip-form-label {
        font-size: 0.8rem;
    }

    .register-past-trip-footer-content {
        padding: 0.7rem 20px;
    }

    .register-past-trip-cancel-btn,
    .register-past-trip-submit-btn {
        padding: 0.9rem 1rem;
        font-size: 0.9rem;
    }

    .register-past-trip-add-passenger-plus,
    .register-past-trip-remove-passenger {
        width: 32px;
        height: 32px;
        font-size: 0.8rem;
    }

    .register-past-trip-autocomplete-avatar {
        width: 24px;
        height: 24px;
        font-size: 0.6rem;
    }

    .register-past-trip-autocomplete-name {
        font-size: 0.8rem;
    }

    .register-past-trip-autocomplete-details {
        font-size: 0.65rem;
    }

    .register-past-trip-toast {
        padding: 0.6rem 0.8rem;
        font-size: 0.85rem;
    }
}

/* iOS Safari specific adjustments */
@supports (-webkit-touch-callout: none) {
    .register-past-trip-main-content {
        padding-bottom: calc(140px + env(safe-area-inset-bottom));
    }
    
    .register-past-trip-fixed-footer {
        padding-bottom: env(safe-area-inset-bottom);
    }
}

/* Improve touch targets for mobile */
@media (max-width: 768px) {
    .register-past-trip-form-input,
    .register-past-trip-cancel-btn,
    .register-past-trip-submit-btn {
        min-height: 44px;
    }

    .register-past-trip-add-passenger-plus,
    .register-past-trip-remove-passenger {
        min-width: 44px;
        min-height: 44px;
    }

    .register-past-trip-autocomplete-item {
        min-height: 44px;
    }
}