/* Quotation Wizard Styles */

.progress-steps {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    position: relative;
}

.progress-steps::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 2px;
    background-color: #e9ecef;
    z-index: 1;
    transform: translateY(-50%);
}

.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    background-color: white;
    padding: 0 10px;
}

.step-number {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: #e9ecef;
    color: #6c757d;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin-bottom: 8px;
    transition: all 0.3s ease;
}

.step-label {
    font-size: 0.875rem;
    color: #6c757d;
    text-align: center;
    font-weight: 500;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background-color: #0d6efd;
    color: white;
}

.step.active .step-label {
    color: #0d6efd;
    font-weight: 600;
}

.step.completed .step-number {
    background-color: #198754;
    color: white;
}

.step.completed .step-label {
    color: #198754;
}

.wizard-step {
    min-height: 300px;
    padding: 1rem 0;
}

.package-card {
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
    transition: all 0.3s ease;
    cursor: pointer;
}

.package-card:hover {
    border-color: #0d6efd;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.15);
}

.package-card.selected {
    border-color: #0d6efd;
    background-color: #f8f9ff;
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.15);
}

.package-card .package-header {
    display: flex;
    justify-content: between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.package-card .package-name {
    font-weight: 600;
    color: #212529;
    margin: 0;
}

.package-card .package-price {
    font-size: 1.25rem;
    font-weight: bold;
    color: #0d6efd;
}

.package-card .package-details {
    color: #6c757d;
    font-size: 0.875rem;
    margin-bottom: 0.5rem;
}

.package-card .package-specs {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

.package-card .spec-item {
    display: flex;
    align-items: center;
    gap: 0.25rem;
    font-size: 0.875rem;
    color: #495057;
}

.package-card .spec-item i {
    color: #0d6efd;
}

.pricing-summary {
    background-color: #f8f9fa;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #dee2e6;
}

.pricing-summary .d-flex {
    margin-bottom: 0.5rem;
}

.pricing-summary .d-flex:last-child {
    margin-bottom: 0;
}

.quotation-summary-item {
    padding: 0.75rem;
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin-bottom: 0.5rem;
    background-color: #f8f9fa;
}

.quotation-summary-item:last-child {
    margin-bottom: 0;
}

.quotation-summary-item .summary-label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 0.25rem;
}

.quotation-summary-item .summary-value {
    color: #212529;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .progress-steps {
        flex-direction: column;
        gap: 1rem;
    }
    
    .progress-steps::before {
        display: none;
    }
    
    .step {
        flex-direction: row;
        gap: 0.5rem;
    }
    
    .step-number {
        margin-bottom: 0;
    }
    
    .package-specs {
        flex-direction: column;
        gap: 0.5rem;
    }
}

/* Animation for step transitions */
.wizard-step {
    opacity: 0;
    transform: translateX(20px);
    transition: all 0.3s ease;
}

.wizard-step.active {
    opacity: 1;
    transform: translateX(0);
}

/* Loading spinner for packages */
.packages-loading {
    text-align: center;
    padding: 2rem;
    color: #6c757d;
}

.packages-loading .spinner-border {
    margin-bottom: 1rem;
}

/* Package quantity controls */
.quantity-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 0.5rem;
}

.quantity-controls .btn {
    width: 32px;
    height: 32px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.quantity-controls input {
    width: 60px;
    text-align: center;
}

/* Selected packages table */
#selected-packages-table {
    margin-top: 1rem;
}

#selected-packages-table th {
    background-color: #f8f9fa;
    font-weight: 600;
    border-bottom: 2px solid #dee2e6;
}

/* Content card header adjustments */
.content-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
    border-bottom: 1px solid #dee2e6;
    background-color: #f8f9fa;
}

.content-card-header .card-title {
    margin: 0;
    color: #212529;
    font-weight: 600;
}

/* Button spacing */
.ms-auto {
    margin-left: auto !important;
}

.ms-auto .btn + .btn {
    margin-left: 0.5rem;
}

/* Custom dropdown styles for client and company search */
.dropdown-menu {
    border: 1px solid #dee2e6 !important;
    border-radius: 0.375rem !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
    z-index: 1000 !important;
    background-color: #ffffff !important;
    min-width: 100% !important;
}

.dropdown-item {
    border: none !important;
    transition: background-color 0.15s ease-in-out !important;
    background-color: #ffffff !important;
    color: #212529 !important;
    padding: 10px 15px !important;
    border-bottom: 1px solid #eee !important;
    display: block !important;
    width: 100% !important;
    text-decoration: none !important;
}

.dropdown-item:hover,
.dropdown-item:focus {
    background-color: #f8f9fa !important;
    color: #212529 !important;
    text-decoration: none !important;
}

.client-option,
.company-option {
    cursor: pointer !important;
    background-color: #ffffff !important;
    color: #212529 !important;
    display: block !important;
    padding: 10px 15px !important;
    text-decoration: none !important;
    border-bottom: 1px solid #eee !important;
}

.client-option:hover,
.company-option:hover,
.client-option:focus,
.company-option:focus {
    background-color: #e9ecef !important;
    color: #212529 !important;
    text-decoration: none !important;
}

.client-option .fw-bold,
.company-option .fw-bold {
    color: #212529 !important;
    font-size: 0.95rem !important;
    font-weight: 600 !important;
    display: block !important;
    margin-bottom: 2px !important;
}

.client-option .text-muted,
.company-option .text-muted {
    font-size: 0.8rem !important;
    color: #6c757d !important;
    display: block !important;
}

.client-option .bi,
.company-option .bi {
    margin-right: 0.25rem !important;
    color: #6c757d !important;
}

/* Ensure dropdown items are visible */
#clientOptions .dropdown-item,
#companyOptions .dropdown-item {
    background-color: #ffffff !important;
    color: #212529 !important;
    border-bottom: 1px solid #eee !important;
    padding: 10px 15px !important;
}

#clientOptions .dropdown-item:hover,
#companyOptions .dropdown-item:hover {
    background-color: #f8f9fa !important;
    color: #212529 !important;
}

/* Fix dropdown menu positioning and visibility */
#clientDropdownMenu,
#companyDropdownMenu {
    background-color: #ffffff !important;
    border: 1px solid #dee2e6 !important;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, 0.15) !important;
}

/* Ensure search input is visible */
#clientSearchInput,
#companySearchInput {
    background-color: #ffffff !important;
    color: #212529 !important;
    border: 1px solid #ced4da !important;
}

/* Search input focus styles */
#quotationClientSearch:focus,
#quotationCompanySearch:focus {
    border-color: #0d6efd;
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.25);
}

/* Position relative for dropdown containers */
.position-relative {
    position: relative;
}

/* Ensure dropdowns appear above other elements */
.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    margin-top: 0.125rem;
    z-index: 1050 !important;
}

/* Fix z-index conflicts with navigation */
#quotation-wizard .dropdown-menu {
    z-index: 1060 !important;
}

/* Ensure quotation wizard content has proper z-index */
#quotation-wizard {
    position: relative;
    z-index: 1;
}

/* Fix Bootstrap dropdown z-index in quotation wizard */
.content-area .dropdown-menu {
    z-index: 1055 !important;
}

/* Prevent navigation dropdowns from auto-showing */
.navbar .dropdown-menu {
    display: none !important;
}

.navbar .dropdown.show .dropdown-menu {
    display: block !important;
}

/* Ensure navigation dropdowns have lower z-index than page content */
.navbar .dropdown-menu {
    z-index: 1040 !important;
}

/* Fix any CSS conflicts that might cause dropdowns to show */
.navbar-nav .dropdown-menu {
    position: absolute !important;
    top: 100% !important;
    left: 0 !important;
    display: none !important;
}

.navbar-nav .dropdown.show .dropdown-menu {
    display: block !important;
}

/* Ensure next steps section is always visible when shown */
#next-steps-section {
    display: none;
    position: relative !important;
    z-index: 1000 !important;
    visibility: visible !important;
    opacity: 1 !important;
    background: #fff !important;
    margin: 20px 0 !important;
    padding: 15px !important;
    border-radius: 8px !important;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1) !important;
}

#next-steps-section.show,
#next-steps-section[style*="block"] {
    display: block !important;
    visibility: visible !important;
    opacity: 1 !important;
}

/* Make the alert inside more prominent */
#next-steps-section .alert-success {
    background-color: #d1edff !important;
    border-color: #0d6efd !important;
    color: #0d6efd !important;
    font-weight: 500 !important;
}