/* === Base Form and Inputs === */
#cbfd-create-form { 
    margin: 20px 0; 
    padding: 18px; 
    border-radius:8px; 
    background:#fff; 
    box-shadow:0 1px 4px rgba(0,0,0,0.05); 
}
.cbfd-form-row { margin-bottom:12px; }
.cbfd-form-row label { 
    font-family: Montserrat, sans-serif; 
    font-size:12px; 
    text-transform:uppercase; 
    letter-spacing:2px; 
    color:#13352d; 
    display:block; 
    margin-bottom:6px; 
}
.cbfd-card-buttons {
    display: flex;
    gap: 5px; /* spacing between buttons */
    flex-wrap: wrap; /* allows wrapping on small screens */
    margin-top: 10px; /* optional spacing from other content */
}

.cbfd-card-buttons button {
    display: inline-block;
    padding: 12px 12px; /* adjust to match your design */
    font-size: 14px;
    cursor: pointer;
}

/* === Export Dropdown Button === */
.cbfd-export-dropdown {
    position: relative;
    display: inline-block;
    float: right;
}
.cbfd-export-dropdown button {
    background:#13352d; 
    color:#ffdc9f; 
    padding:12px 18px; 
    font-family: Montserrat, sans-serif; 
    border:none; 
    border-radius:6px; 
    cursor:pointer; 
    min-width:120px;
    transition: background 0.3s ease, color 0.3s ease;
}
.cbfd-export-dropdown button:hover {
    background:#ffdc9f; 
    color:#13352d; 
}
.cbfd-export-menu {
    display: none;
    position: absolute;
    right: 0;
    background: #fff;
    border: 1px solid #ddd;
    min-width: 120px;
    z-index: 10;
    border-radius: 6px;
    box-shadow: 0 4px 8px rgba(0,0,0,0.1);
}
.cbfd-export-menu a {
    display: block;
    padding: 12px 12px;
    text-decoration: none;
    color: #13352d;
    font-family: Montserrat, sans-serif;
}
.cbfd-export-menu a:hover {
    background: #ffdc9f;
    color: #13352d;
}
.cbfd-export-dropdown:hover .cbfd-export-menu {
    display: block;
}

/* === Inputs === */
#cbfd-create-form input[type="text"], 
#cbfd-create-form textarea, 
#cbfd-create-form select { 
    width:100%; 
    padding:10px 10px; 
    border-radius:5px; 
    border:1px solid #ddd; 
    font-family: Montserrat, sans-serif; 
}

/* === Controls for Filter & Search === */
#cbfd-orders-controls {
    display: flex;
    gap: 10px;
    margin-bottom: 15px;
    align-items: center;
}
#cbfd-orders-controls input, #cbfd-orders-controls select {
    padding: 6px 8px;
    font-size: 14px;
    border: 1px solid #13352d;
    font-family: Montserrat;
}

/* === Buttons === */
#cbfd-create-order-btn, .cbfd-mark-packed, .cbfd-mark-picking, .cbfd-put-onhold { 
    background:#13352d; 
    color:#ffdc9f; 
    padding:12px 18px; 
    font-family: Montserrat, sans-serif; 
    border:none; 
    border-radius:6px !important; 
    cursor:pointer; 
    display:inline-block;
    min-width:120px;
    position:relative;
    overflow:hidden;
    margin-right:6px;
    transition: background 0.3s ease, color 0.3s ease;
}
#cbfd-create-order-btn:hover, .cbfd-mark-packed:hover, .cbfd-mark-picking:hover { 
    background:#ffdc9f; 
    color:#13352d; 
}

/* === Put On Hold button === */
.cbfd-put-onhold {
    background:#ffdc9f;
    color:#13352d;
}
.cbfd-put-onhold:hover {
    background:#ffdc9f7d;
    color:#13352d;
}

/* === Drop zone === */
#cbfd-drop-zone { 
    border:2px dashed #ccc; 
    padding:12px; 
    text-align:center; 
    cursor:pointer; 
    border-radius:6px; 
    color:#13352d; 
    background:#fffdf5; 
}
#cbfd-drop-zone.dragover { 
    border-color:#ffdc9f; 
    box-shadow:0 0 10px #ffdc9f; 
}

/* === Upload previews === */
#cbfd-upload-preview .cbfd-file-preview { 
    display:inline-block; 
    padding:8px 12px; 
    margin:6px; 
    border-radius:6px; 
    background:#f7f7f7; 
    position:relative; 
    font-family: Montserrat, sans-serif; 
}
.cbfd-file-remove { 
    position:absolute; 
    top:3px; 
    right:6px; 
    cursor:pointer; 
    color:#ff0000; 
    font-weight:bold; 
}

/* === Orders container and cards === */
#cbfd-orders-container { 
    display:flex;
    flex-wrap:wrap;
    align-items:flex-start;
    margin-top:20px;
    gap:15px;
}

/* 4-column layout */
.cbfd-order-card {
    flex: 0 0 calc(25% - 15px);
    background:#fff; 
    border-radius:25px; 
    border:3px solid #ffdc9f; 
    padding:20px;
    color:#13352d; 
    font-family: Montserrat, sans-serif; 
    position:relative;
    transition: transform 0.45s ease, opacity 0.45s ease, box-shadow 0.3s ease;
}
.cbfd-order-card.new { opacity: 0; transform: scale(0.95); }
.cbfd-order-card:hover { box-shadow: 0 0 15px #ffdc9f; }

/* card header */
.cbfd-card-header { display:flex; justify-content:space-between; align-items:center; margin-bottom:15px; }
.cbfd-po { font-size:18px; font-weight:700; }
.cbfd-status { padding:6px 10px; border-radius:6px; font-weight:700; text-transform:capitalize; }
.cbfd-status.picking { background:#FFD600; color:#000; }
.cbfd-status.packed { background:#37C048; color:#fff; }
.cbfd-status.amended { background:#FF7F00; color:#fff; }
.cbfd-status.onhold { background:#ff0000; color:#fff; }
.cbfd-status-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: no wrap;
}
.cbfd-status-btn {
    padding: 12px 12px;
    font-size: 14px;
    border-radius: 4px;
    border: none;
    flex: 1 1 auto;         /* Make all buttons roughly the same size */
    text-align: center;     /* Keep text centered */
    white-space: nowrap;    /* Prevent text from breaking */
    cursor: pointer;
}
.cbfd-status-btn:hover {
    background: #ffdc9f;
    color: #13352d;
}

/* delete icon */
.cbfd-delete-order { position:absolute; top:10px; right:12px; font-size:22px; cursor:pointer; color:#ff0000; font-weight:bold; }

/* rows */
.cbfd-row { margin:8px 0; font-size:14px; line-height:1.5; }

/* files */
.cbfd-files { 
    margin-top:12px;
    position: relative;
    padding-top: 12px;
}
.cbfd-files::before {
    content: "";
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: #ffdc9f;
    border-radius: 1px;
}
.cbfd-file-item { display:flex; align-items:center; gap:8px; margin-bottom:8px; }
.cbfd-file-icon { margin-right:6px; }
.cbfd-delete-file { cursor:pointer; color:#ff0000; margin-left:auto; }

/* upload input on card */
.cbfd-upload-row { margin-top:12px; }
.cbfd-upload-input { margin-top:8px; }

/* responsive */
@media (max-width:1200px){ .cbfd-order-card { flex: 0 0 calc(33.33% - 15px); } }
@media (max-width:900px){ .cbfd-order-card { flex: 0 0 calc(50% - 15px); } }
@media (max-width:760px){ .cbfd-order-card { flex: 0 0 calc(100% - 15px); } }

/* Two-column wrapper */
.cbfd-two-column {
    display: flex;
    gap: 15px;
    width: 100%;
    margin-bottom: 15px;
}
.cbfd-two-column .cbfd-form-col { flex: 1; }

/* labels and inputs */
.cbfd-form-col label { display: block; margin-bottom: 6px; font-weight: 600; }
.cbfd-form-col input { width: 100%; padding: 8px; box-sizing: border-box; border: 1px solid #ffdc9f !important; }

/* Packer input */
.cbfd-packer-editor { display: inline-flex; gap: 6px; align-items: center; }
.cbfd-packer-input { padding: 4px 6px; }
.cbfd-save-packer { padding: 4px 8px; cursor: pointer; }
.cbfd-assign-packer { color: #0073aa; cursor: pointer; text-decoration: underline; }
.cbfd-packer-editable { cursor: pointer; text-decoration: underline; }

/* Buttons spacing from files */
.cbfd-mark-packed, .cbfd-mark-picking, .cbfd-put-onhold { margin-top: 12px; display:block; }

/* === Pagination Buttons === */
#cbfd-pagination {
    display: flex;
    justify-content: center;
    gap: 12px;
    margin-top: 20px;
    flex-wrap: wrap;
}

#cbfd-prev-page, #cbfd-next-page {
    background: #13352d;
    color: #ffdc9f;
    border: none;
    border-radius: 6px;
    padding: 8px 18px;
    font-family: Montserrat, sans-serif;
    font-size: 14px;
    cursor: pointer;
    min-width: 100px;
    transition: background 0.3s ease, color 0.3s ease, box-shadow 0.3s ease;
}

#cbfd-prev-page:hover, #cbfd-next-page:hover {
    background: #ffdc9f;
    color: #13352d;
    box-shadow: 0 0 8px #ffdc9f;
}

#cbfd-prev-page:disabled, #cbfd-next-page:disabled {
    background: #ddd;
    color: #999;
    cursor: not-allowed;
    box-shadow: none;
}
