/* ==========================================================================
   1. Page Layout & Structural Cards
   ========================================================================== */
.order-page{
    max-width: 900px;
    margin: 40px auto;
    padding: 20px;
}

.order-title{
    font-size: 3rem;
    text-align: center;
    margin-bottom: 30px;
}

.order-card{
    background: #fff;
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.order-card h2{
    margin-bottom: 15px;
}

label{
    display: block;
    margin-top: 15px;
    font-weight: bold;
    color: #222;
    font-family: sans-serif;
    font-size: 14px;
}

/* This essentially makes legends visual invisible but keeps accessibility for screen readers */
legend{
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* ==========================================================================
   2. Unified Form Field Baseline
   ========================================================================== */
/* Combines all text inputs, textareas, selects, and custom checkboxes text blocks */
select, input[type="number"], input[type="text"], input[type="email"], textarea, .select-box{
    width: 100%;
    background-color: #fff;
    border: 1px solid #ccc;
    padding: 10px;
    border-radius: 6px;
    font-family: sans-serif;
    font-size: 14px;
    color: #333;
    box-sizing: border-box;
    margin-top: 5px;
    margin-bottom: 0;
}

/* Extra right spacing pad to safely isolate icons from running text selections */
select, .select-box{
    padding-right: 35px;
    cursor: pointer;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px;
}

/* Strip default operating system chevrons safely */
select{
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
}

select::-ms-expand{
    display: none;
    /* Trims down fallback legacy track layouts on older software engines */
}

/* ==========================================================================
   3. Custom Color Overlay Layout Component
   ========================================================================== */
.multiselect-container{
    position: relative;
    width: 100%;
}

.select-box{
    user-select: none;
    /* Let parent structure manage empty flow gaps */
}

.checkboxes-list{
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background-color: #fff;
    border: 1px solid #ccc;
    border-top: none;
    max-height: 200px;
    overflow-y: auto;
    z-index: 9999;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

/* Override text label settings for nested popup content items */
.checkboxes-list label{
    display: flex;
    align-items: center;
    padding: 12px 10px;
    margin: 0;
    font-weight: normal;
    color: #333;
    border-bottom: 1px solid #eee;
}

.checkboxes-list input{
    margin-right: 12px;
    width: 18px;
    height: 18px;
}

/* ==========================================================================
   4. File Upload Area & Submissions Buttons
   ========================================================================== */
.upload-zone{
    border: 2px dashed #0077ff;
    padding: 40px;
    text-align: center;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease;
}

.upload-zone.drag-over{
    background: #e8f2ff;
    border-color: #005fcc;
}

#upload-zone.hidden, #model-preview{
    display: none;
}

.model-preview{
    width: 100%;
    height: 300px;
    background: #f5f5f5;
    border-radius: 10px;
    margin-top: 20px;
}

.order-btn{
    margin-top: 20px;
    padding: 14px 40px;
    background: #0077ff;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 1.2rem;
    cursor: pointer;
    width: 100%;
}

.order-btn:hover{
    background: #005fcc;
}

p{
    margin: 0;
}

.note-text{
    color: #888888;
    font-size: 13px;
    margin-top: 5px;
}

#quote-output{
    display: flex;
    flex-direction: row;
    align-items: center;
}
#quote-output p:last-of-type{
    margin-left: 50px;
}



/* Container styling */
.upload-zone{
    border: 2px dashed #3b82f6;
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    background-color: #f8fafc;
    cursor: pointer;
    transition: all 0.3s ease;
    margin: 20px auto;
    font-family: sans-serif;
}

/* Modern hover and drag-over state */
.upload-zone:hover{
    background-color: #eff6ff;
    border-color: #2563eb;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.1);
}

/* Text styling */
.upload-zone p{
    margin: 0;
    font-size: 16px;
    color: #475569;
    line-height: 1.5;
}

/* Accent color for the action phrase */
.upload-zone .browse-text{
    color: #3b82f6;
    font-weight: 600;
}

/* HIDES THE UGLY DEFAULT BUTTON completely */
#file-input{
    display: none;
}

#file-info{
    margin-top: 15px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* ==========================================================================
   5. Navigation Controls
   ========================================================================== */
/* Dashboard Container */
.workbench-dashboard{
    margin-top: 25px;
    padding: 15px;
    background-color: #fcfcfc;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

/* Button Row Alignment */
.workbench-button-row{
    display: flex;
    width: 100%;
    gap: 10px;
}

/* Standard Button Properties */
.workbench-button-row button{
    flex: 1; /* Makes all 4 buttons identical widths */
    padding: 12px 8px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

/* 1. Navigation Arrow Buttons (Prev/Next) */
.nav-btn{
    background-color: #e0e0e0;
    color: #333;
}
.nav-btn:hover:not(:disabled){
    background-color: #ccc;
}

/* 2. Add / Save Action Button */
.action-btn{
    background-color: #0077ff;
    color: white;
}
.action-btn:hover:not(:disabled){
    background-color: #0055cc;
}

/* 3. Trash Delete Button */
.danger-btn{
    background-color: #ffe5e5;
    color: #cc0000;
}
.danger-btn:hover:not(:disabled){
    background-color: #ffcccc;
}

/* Disabled State Rules (Crucial for Slider logic!) */
.workbench-button-row button:disabled{
    opacity: 0.4;
    cursor: not-allowed;
    filter: grayscale(1);
}

/* Item Tracker Text Styling */
.item-counter{
    font-size: 14px;
    font-weight: bold;
    color: #666;
    letter-spacing: 0.5px;
}

/* Mobile Responsiveness Rules */
@media (max-width: 480px){
    .workbench-button-row{
        flex-direction: column; /* Stack them vertically on mobile */
    }
}
