/* Sulfur cell colors */
.hasSulfurBG {
    background-color: #b3ffb3;
}

.nonHasSulfurBG {
    background-color: #ff9999;
}

/* Modal: Print Tag Confirmation */
.modal-print-tag-confirmation {
    width: 520px;
    background: #f9fafb;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.14);
    border: 1px solid #e5e7eb;
    padding: 0;
}

.modal-print-tag-confirmation .modal-header {
    border-bottom: 1px solid #e5e7eb !important;
    background: #fff;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    padding: 20px 28px 10px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.modal-print-tag-confirmation .modal-header h5 {
    margin: 0;
    font-size: 1.4em;
    font-weight: 600;
    color: #22223b;
    letter-spacing: 0.01em;
}

.modal-print-tag-confirmation .modal-body {
    padding: 22px 28px 14px 28px;
    background: #f9fafb;
    max-height: 550px;
    overflow-y: auto;
}

.modal-print-tag-confirmation .modal-footer {
    border-top: 1px solid #e5e7eb;
    background: #f3f4f6;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    display: flex;
    justify-content: unset;
    gap: 12px;
    padding: 18px 28px;
}

.modal-print-tag-confirmation.fade.in {
    top: 3% !important;
}

/* Modal: Edit Length */
.modal-edit-length {
    width: 520px;
    background: #f9fafb;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.14);
    border: 1px solid #e5e7eb;
    padding: 0;
}

.modal-edit-length .modal-header {
    border-bottom: 1px solid #e5e7eb !important;
    background: #fff;
    border-top-left-radius: 16px;
    border-top-right-radius: 16px;
    padding: 20px 28px 10px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}
.modal-edit-length .modal-header h5 {
    margin: 0;
    font-size: 1.4em;
    font-weight: 600;
    color: #22223b;
    letter-spacing: 0.01em;
}

.modal-edit-length .modal-body {
    padding: 22px 28px 14px 28px;
    background: #f9fafb;
    max-height: 550px;
    overflow-y: auto;
}

.modal-edit-length .modal-footer {
    border-top: 1px solid #e5e7eb;
    background: #f3f4f6;
    border-bottom-left-radius: 16px;
    border-bottom-right-radius: 16px;
    display: flex;
    justify-content: space-between;
    gap: 10px;
    padding: 18px 28px;
}

.modal-footer .btn {
    flex: 1;
    text-align: center;
}

/* Form grid layout inside modals */
.modal-body .form-grid {
    display: grid;
    grid-template-columns: 160px 1fr;
    grid-column-gap: 16px;
    grid-row-gap: 12px;
}

.modal-body .form-grid .full {
    grid-column: 1 / -1;
}

.modal-body .pair-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.modal-body .form-label {
    align-self: center;
    color: #3c4043;
    font-weight: 600;
}

.modal-body .form-control,
.modal-body .field-input,
.modal-body .field-select {
    width: 100%;
}

.modal-body input[type="number"] {
    text-align: right;
}

/* Input styles */
.field-input,
.field-select,
.print-comments {
    width: 220px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 1em;
    background: #fff;
    transition: border-color 0.2s, box-shadow 0.2s;
    outline: none;
    box-sizing: border-box;
    min-height: 40px !important;
    height: 40px;
    padding: 8px 12px;
}

.field-input:focus,
.field-select:focus,
.print-comments:focus {
    border-color: #4463d1;
    box-shadow: 0 0 0 2px #e3e9fa;
}

.print-comments {
    min-height: 80px !important;
    height: 80px;
    resize: vertical;
    width: 100%;
}

/* Required star */
.required-star {
    color: #e63946;
    font-size: 1.12em;
    margin-left: 4px;
    font-weight: bold;
    vertical-align: middle;
}

/* Footer button bar */
.footer-btn-bar {
    display: flex;
    width: 100%;
    gap: 1rem;
}

.w-half {
    width: 50%;
    min-width: 0;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

/* Warning text */
#warning {
    color: #e63946;
    font-size: .92em;
    margin-top: 4px;
    display: block;
}

/* Close button */
.modal-print-tag-confirmation .close,
.modal-edit-length .close {
    font-size: 1.7em;
    color: #888;
    opacity: 0.7;
    background: transparent;
    border: none;
    margin-right: 0;
    padding: 0 0 0 10px;
    transition: color 0.15s;
}
.modal-print-tag-confirmation .close:hover,
.modal-edit-length .close:hover {
    color: #e63946;
    opacity: 1;
}

/* Number input spinners */
input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type=number] {
    -moz-appearance: textfield;
}

/* Hot/Cold toggle buttons */
#printLengthToggle label.btn,
#editLengthToggle  label.btn {
    border: 1px solid #c7c7c7 !important;
    padding: 6px 12px !important;
    cursor: pointer !important;
    user-select: none !important;
    background: #f3f4f6 !important;
    color: #374151 !important;
    box-shadow: none !important;
}

#printLengthToggle label.btn.btn-inactive,
#editLengthToggle  label.btn.btn-inactive {
    background: #f3f4f6 !important;
    color: #374151 !important;
    border-color: #c7c7c7 !important;
}

#printLengthToggle label.btn.btn-hot-active,
#editLengthToggle  label.btn.btn-hot-active {
    background: #dc2626 !important;
    color: #fff !important;
    border-color: #b91c1c !important;
}

#printLengthToggle label.btn.btn-cold-active,
#editLengthToggle  label.btn.btn-cold-active {
    background: #2563eb !important;
    color: #fff !important;
    border-color: #1d4ed8 !important;
}

#printLengthToggle .btn { min-width: 72px; }
#editLengthToggle  .btn { min-width: 72px; }

/* Disabled inputs */
input.disabled {
    background-color: #f9fafb !important;
    color: #6b7280 !important;
    cursor: not-allowed !important;
}

/* Printer/Employee layout tweaks */
.printer-select {
    margin-top: 25px;
}

.printerLabel {
    margin-top: 15px;
}

/* Length note alert */
.length-note {
    padding: 6px 10px;
    font-size: 0.9em;
    text-align: center;
    margin: 10px auto;
    width: fit-content;
}

/* Responsive modal */
@media (max-width: 650px) {
    .modal-print-tag-confirmation,
    .modal-edit-length {
        width: 98vw;
        min-width: 0;
        padding: 0;
    }
    .modal-print-tag-confirmation .modal-body,
    .modal-print-tag-confirmation .modal-header,
    .modal-print-tag-confirmation .modal-footer,
    .modal-edit-length .modal-body,
    .modal-edit-length .modal-header,
    .modal-edit-length .modal-footer {
        padding-left: 12px;
        padding-right: 12px;
    }
    .field-input,
    .field-select,
    .print-comments {
        width: 100%;
        min-width: 0;
    }
}
