/* create-order.css - Business-serious styling for order creation form */

:root {
    --primary-color: var(--frs-accent2-color);
    --secondary-color: #6c757d;
    --success-color: #28a745;
    --danger-color: #dc3545;
    --warning-color: #ffc107;
    --info-color: #17a2b8;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --border-color: #dee2e6;
    --border-radius: 0.25rem;
    --box-shadow: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
    --transition-speed: 0.3s;
}

/* Main container */
.order-creation-container {
    margin: 0 auto;
    padding: 1rem 1rem;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    color: var(--dark-color);
    border-radius: 0.7rem;
    max-width: 100%;
}

/* Progress tracker */
.progress-container {
    margin-bottom: 2rem;
}

.progress-bar-container {
    height: 0.5rem;
    background-color: #e9ecef;
    border-radius: var(--border-radius);
    margin-bottom: 1rem;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: var(--primary-color);
    transition: width 0.5s ease;
}

.progress-steps {
    display: flex;
    justify-content: space-between;
    position: relative;
}

.progress-step {
    flex: 1;
    text-align: center;
    position: relative;
    color: var(--secondary-color);
}

.step-indicator {
    width: 2.25rem;
    height: 2.25rem;
    line-height: 2.25rem;
    background-color: #fff;
    border: 2px solid var(--border-color);
    border-radius: 50%;
    margin: 0 auto 0.5rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
    position: relative;
    z-index: 1;
    box-shadow: var(--box-shadow);
}

.progress-step.active .step-indicator {
    background-color: var(--frs-accent2-color);
    border-color: var(--frs-accent2-color);
    color: white;
}

.progress-step.completed .step-indicator {
    background-color: var(--success-color);
    border-color: var(--success-color);
    color: white;
}

.step-label {
    font-size: 0.9rem;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    padding: 0 0.5rem;
}

.progress-step.active .step-label {
    color: var(--dark-color);
    font-weight: 600;
}

/* Order content layout */
.order-content-container {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    position: relative;
}

/* Order form container */
.order-form-container {
    flex: 1;
    min-width: 280px;
    transition: all var(--transition-speed);
    overflow: hidden; /* Prevent overflow */
    border-radius: 0.7rem;
}

.form-card {
    background-color: #fff;
    border-radius: 0.7rem;
    box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.1);
    padding: 0.5rem;
    margin-bottom: 1.5rem;
    transition: all var(--transition-speed);
    overflow: hidden; /* Prevent overflow */
}

.page-title {
    font-weight: 600;
    color: #2c3e50;
    display: flex;
    align-items: center;
    font-size: 1.75rem;
}

.step-title {
    font-size: 1.25rem;
    font-weight: 400;
    color: var(--secondary-color);
    margin-left: 0.5rem;
}

/* Form elements */
.form-floating {
    position: relative;
    margin-bottom: 0.25rem;
}

.form-hint {
    font-size: 0.8rem;
    color: var(--secondary-color);
    margin-top: 0.25rem;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 2rem;
    border-top: 1px solid var(--border-color);
    padding-top: 1.5rem;
}

.next-btn {
    min-width: 140px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    transition: all 0.2s;
    margin-left: auto;
}

/* Order Summary Panel */
.order-summary-panel {
    width: 300px;
    background-color: #fff;
    border-radius: 0.5rem;
    box-shadow: 0 0.25rem 1rem rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 2rem;
    max-height: calc(100vh - 4rem);
    overflow-y: auto;
    align-self: flex-start;
}

.summary-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.75rem;
}

    .summary-header h5 {
        margin-bottom: 0;
        font-weight: 600;
        display: flex;
        align-items: center;
        gap: 0.5rem;
    }

.summary-content {
    animation: fadeIn 0.3s ease-in-out;
}

.summary-section {
    margin-bottom: 1.25rem;
    padding-bottom: 1.25rem;
    border-bottom: 1px solid var(--border-color);
}

    .summary-section:last-child {
        border-bottom: none;
        margin-bottom: 0;
        padding-bottom: 0;
    }

    .summary-section h6 {
        font-weight: 600;
        margin-bottom: 0.75rem;
        color: var(--primary-color);
    }

    .summary-section p {
        margin-bottom: 0.5rem;
        font-size: 0.9rem;
    }

/* Step 1: Order Type Selection */
.order-type-selection h4,
.state-selection h4,
.essential-info h4 {
    margin-bottom: 1.25rem;
    color: #2c3e50;
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.type-options {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
    margin-bottom: 2rem;
}

.type-option {
    position: relative;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    width: calc(33.333% - 0.75rem);
    min-width: 150px;
    padding: 1.5rem 1rem;
    background-color: #f8f9fa;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    cursor: pointer;
    transition: all var(--transition-speed);
}

    .type-option:hover {
        background-color: #fff;
        transform: translateY(-2px);
        box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.1);
    }

    .type-option.selected {
        background-color: #e6f7ff;
        border-color: var(--primary-color);
    }

    .type-option input[type="radio"] {
        position: absolute;
        opacity: 0;
    }

.radio-checkmark {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    width: 1.25rem;
    height: 1.25rem;
    background-color: #fff;
    border: 2px solid var(--border-color);
    border-radius: 50%;
}

.type-option.selected .radio-checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

    .type-option.selected .radio-checkmark::after {
        content: "";
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 0.5rem;
        height: 0.5rem;
        background-color: white;
        border-radius: 50%;
    }

.option-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
}

.option-icon {
    font-size: 1.75rem;
    color: var(--primary-color);
    margin-bottom: 0.5rem;
}

.option-name {
    font-weight: 600;
    font-size: 1.1rem;
}

/* Step 2: Buyer Information */
.buyer-information {
    position: relative;
}

.tabs-container {
    margin-top: 1rem;
}

.tabs-header {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0;
}

.tab-button {
    border: none;
    background: none;
    padding: 0.75rem 1.25rem;
    font-weight: 500;
    color: var(--secondary-color);
    border-bottom: 3px solid transparent;
    transition: all var(--transition-speed);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

    .tab-button:hover {
        color: var(--primary-color);
    }

    .tab-button.active {
        color: var(--primary-color);
        border-bottom: 3px solid var(--primary-color);
    }

.tabs-content {
    padding-top: 1rem;
    overflow: hidden; /* Prevent overflow */
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.3s ease-in-out;
    overflow-y: auto;
    overflow-x: hidden;
}

/* Step 3: Vehicle Information */
.essential-info {
    margin-bottom: 2rem;
}

.vehicle-information {
    margin-top: 2rem;
}

.advanced-toggle {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.btn-advanced {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.advanced-info {
    padding: 1.5rem;
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
    border: 1px solid var(--border-color);
}

.animate-fade {
    animation: fadeIn 0.3s ease-in-out;
}

.nav-tabs {
    border-bottom: 1px solid var(--border-color);
    margin-bottom: 1.5rem;
    border-radius: 0.7rem;
}

    .nav-tabs .nav-link {
        border: none;
        color: var(--secondary-color);
        padding: 0.75rem 1rem;
        font-weight: 500;
        margin-right: 0.5rem;
        border-bottom: 3px solid transparent;
        background-color: transparent;
    }

        .nav-tabs .nav-link:hover {
            color: var(--primary-color);
        }

        .nav-tabs .nav-link.active {
            color: var(--primary-color);
            border-bottom-color: var(--primary-color);
            background-color: transparent;
        }

.tab-content > .tab-pane {
    display: none;
}

    .tab-content > .tab-pane.fade {
        opacity: 0;
        transition: opacity var(--transition-speed);
        border-radius: 0.7rem;
    }

        .tab-content > .tab-pane.fade.show {
            opacity: 1;
            border-radius: 0.7rem;
        }

.tab-content > .active {
    display: block;
}

/* Custom switch styling */
.custom-switch {
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.form-check-input:checked {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

/* Step 4: Document Upload */
.document-upload h4 {
    margin-bottom: 1.5rem;
    color: #2c3e50;
    font-weight: 600;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--border-color);
}

.upload-container {
    margin-top: 1.5rem;
}

.upload-dropzone {
    border: 2px dashed var(--border-color);
    border-radius: 0.5rem;
    padding: 2rem;
    text-align: center;
    background-color: #f8f9fa;
    transition: all var(--transition-speed);
    cursor: pointer;
    position: relative;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
}

    .upload-dropzone:hover {
        background-color: #fff;
        border-color: var(--primary-color);
    }

    .upload-dropzone.drag-active {
        background-color: #e6f7ff;
        border-color: var(--primary-color);
    }

.upload-input {
    position: absolute;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
    z-index: 5;
}

.upload-content {
    z-index: 1;
    width: 100%;
}

.upload-prompt {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

.upload-icon {
    font-size: 3rem;
    color: var(--secondary-color);
}

.upload-text {
    font-size: 1.25rem;
    font-weight: 500;
    margin: 0;
}

.upload-divider {
    position: relative;
    width: 100%;
    text-align: center;
    color: var(--secondary-color);
    margin: 0.5rem 0;
}

    .upload-divider::before,
    .upload-divider::after {
        content: "";
        position: absolute;
        top: 50%;
        width: 35%;
        height: 1px;
        background-color: var(--border-color);
    }

    .upload-divider::before {
        left: 0;
    }

    .upload-divider::after {
        right: 0;
    }

.upload-btn {
    padding: 0.75rem 1.5rem;
    font-weight: 500;
}

.upload-hint {
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--secondary-color);
}

.selected-file {
    display: flex;
    align-items: center;
    gap: 1rem;
    background-color: #fff;
    padding: 1rem;
    border-radius: 0.5rem;
    border: 1px solid var(--border-color);
}

.file-icon {
    font-size: 2rem;
    color: #dc3545;
}

.file-details {
    flex: 1;
    text-align: left;
    overflow: hidden;
}

.file-name {
    display: block;
    font-weight: 500;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 400px;
}

.file-size {
    font-size: 0.85rem;
    color: var(--secondary-color);
}

.order-completion {
    margin-top: 2rem;
}

.completion-note {
    display: flex;
    align-items: flex-start;
    gap: 0.1rem;
    padding: 1rem;
    background-color: #f0f4f8;
    border-radius: 0.5rem;
    margin-bottom: 2rem;
}

    .completion-note i {
        font-size: 1.25rem;
        color: var(--info-color);
        margin-top: 0.25rem;
    }

    .completion-note p {
        margin: 0;
        font-size: 0.95rem;
    }

/* Responsive Adaptations */
@media (max-width: 992px) {
    .order-summary-panel {
        width: 100%;
        position: relative;
        top: 0;
        order: -1;
    }

    .type-option {
        width: calc(50% - 0.5rem);
    }
}

@media (max-width: 768px) {
    .progress-steps {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }

    .progress-step {
        flex: 0 0 auto;
        width: auto;
    }

    .type-option {
        width: 100%;
    }

    .tabs-header {
        overflow-x: auto;
        white-space: nowrap;
        padding-bottom: 0.5rem;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Validation */
.validation-message {
    color: var(--danger-color);
    font-size: 0.85rem;
    margin-top: 0.25rem;
}

.input-validation-error {
    border-color: var(--danger-color);
}

.validation-summary-errors {
    color: var(--danger-color);
    background-color: rgba(220, 53, 69, 0.1);
    padding: 1rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    border-left: 4px solid var(--danger-color);
}

    .validation-summary-errors ul {
        margin-bottom: 0;
        padding-left: 1.25rem;
    }

/* Form-specific adaptations for a business-serious look */
.form-floating > .form-control:focus,
.form-floating > .form-control:not(:placeholder-shown) {
    padding-top: 1.625rem;
    padding-bottom: 0.625rem;
}

.form-floating > .form-control:focus ~ label,
.form-floating > .form-control:not(:placeholder-shown) ~ label {
    opacity: 0.65;
    transform: scale(0.85) translateY(-0.5rem) translateX(0.15rem);
}

.form-floating > label {
    padding: 1rem 0.75rem;
}

.input-group-text {
    background-color: #f8f9fa;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.25rem rgba(0, 86, 179, 0.15);
}

/* Alert styling */
.alert {
    border-radius: 0.5rem;
    border: none;
    padding: 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.alert i {
    font-size: 1.25rem;
}

.alert-info {
    background-color: rgba(23, 162, 184, 0.1);
    color: #0c5460;
    border-left: 4px solid var(--info-color);
}

.alert-danger {
    background-color: rgba(220, 53, 69, 0.1);
    color: #721c24;
    border-left: 4px solid var(--danger-color);
}

/* Button styling for business-serious look */
.btn {
    font-weight: 500;
    padding: 0.4rem 0.8rem;
    border-radius: 0.35rem;
    transition: all 0.2s;
}

.btn-primary {
    background-color: var(--frs-accent1-color);
    border-color: var(--frs-accent1-color);
}

    .btn-primary:hover {
        background-color: var(--frs-accent2-color);
        border-color: var(--frs-accent2-color);
        transform: translateY(-1px);
        box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
    }

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
}

.btn-success:hover {
    background-color: #218838;
    border-color: #218838;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.1);
}

.btn-outline-secondary {
    color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-outline-secondary:hover {
    background-color: var(--secondary-color);
    color: white;
}

.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}

.required-field {
    border-color: #dc3545;
}

    .required-field:focus {
        box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
        border-color: #dc3545;
    }

.glow-required {
    animation: glowPulse 2s infinite;
}

@keyframes glowPulse {
    0% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0.4);
    }

    70% {
        box-shadow: 0 0 0 7px rgba(220, 53, 69, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(220, 53, 69, 0);
    }
}

.required-label::after {
    content: " *";
    color: #dc3545;
}

/* Add new styles for slim input fields with outside labels */
.form-group-slim {
    margin-bottom: 1rem;
    position: relative;
}

.form-group-slim label {
    display: block;
    margin-bottom: 0.25rem;
    font-weight: 500;
    color: #4a5568;
}

.form-group-slim .form-control {
    height: 38px; /* Slimmer height */
    padding: 0.375rem 0.75rem;
}

.form-group-slim .input-group {
    display: flex;
}

.form-group-slim .input-group-text {
    display: flex;
    align-items: center;
    height: 38px; /* Match the height of inputs */
}

.form-group-slim .form-hint {
    font-size: 0.8rem;
    color: var(--secondary-color);
    margin-top: 0.25rem;
}

.form-group-slim .validation-message {
    display: block;
    margin-top: 0.25rem;
}

/* Override form-floating styles for our slimmer version */
.form-floating {
    position: relative;
    margin-bottom: 1rem;
}

.form-floating > .form-control, 
.form-floating > .form-select {
    height: 38px;
    padding: 0.375rem 0.75rem;
}

.form-floating > label {
    padding: 0.375rem 0.75rem;
    height: 38px;
    pointer-events: none;
}

/* Preserve required field styling */
.required-field {
    border-color: #dc3545;
}

.required-field:focus {
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
    border-color: #dc3545;
}

.required-label::after {
    content: " *";
    color: #dc3545;
}

/* Order summary styling */
.summary-grid {
    display: flow;
    grid-template-columns: 1fr 1fr;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
}

.summary-item {
    display: flex;
    align-items: baseline;
    font-size: 0.9rem;
    line-height: 1.2;
}

    .summary-item.full-width {
        grid-column: 1 / -1;
    }

.summary-label {
    color: #6c757d;
    font-weight: 500;
    margin-right: 0.5rem;
    flex-shrink: 0;
}

.summary-value {
    font-weight: 400;
}

.summary-section {
    padding-bottom: 0.75rem;
    margin-bottom: 0.75rem;
    border-bottom: 1px solid #e9ecef;
}

    .summary-section:last-child {
        border-bottom: none;
        margin-bottom: 0;
    }

    .summary-section h6 {
        font-weight: 600;
        margin-bottom: 0.5rem;
        color: #495057;
        font-size: 0.95rem;
    }

/* Add styles for the taxes and fees section */
.taxes-fees-container {
    max-width: 900px;
    margin: 0 auto;
}

.loading-container {
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.joint-buyers {
    border-radius: 0.7rem;
}

/* Radio button custom styling with green checkmark */
.type-option {
    position: relative;
}

    .type-option input[type="radio"] {
        position: absolute;
        opacity: 0;
        cursor: pointer;
    }

.radio-checkmark {
    position: absolute;
    top: 15px;
    right: 15px;
    height: 24px;
    width: 24px;
    background-color: #f8f9fa;
    border: 2px solid #dee2e6;
    border-radius: 50%;
    transition: all 0.2s ease-in-out;
}

.type-option:hover .radio-checkmark {
    background-color: #e9ecef;
}

.type-option input[type="radio"]:checked ~ .radio-checkmark {
    background-color: #28a745;
    border-color: #28a745;
}

.radio-checkmark:after {
    content: "";
    position: absolute;
    display: none;
}

.type-option input[type="radio"]:checked ~ .radio-checkmark:after {
    display: block;
}

.type-option .radio-checkmark:after {
    left: 8px;
    top: 4px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 3px 3px 0;
    transform: rotate(45deg);
}

/* Improve type-option selected state */
.type-option.selected {
    border-color: #28a745;
    box-shadow: 0 0 0 2px rgba(40, 167, 69, 0.25);
}

    .type-option.selected .option-name {
        color: #28a745;
        font-weight: 600;
    }