/* General Container */
#stock-take-wrapper {
    font-family: Arial, sans-serif;
    max-width: 100%;
    margin: 20px auto;
    padding: 10px;
    background: #fff;
    border-radius: 6px;
    border: 1px solid #ccc;
}

/* Tab Navigation */
.tab-link {
    display: inline-block;
    padding: 10px 16px;
    margin-right: 5px;
    background: #eee;
    border: 1px solid #ccc;
    border-bottom: none;
    cursor: pointer;
    border-radius: 6px 6px 0 0;
    font-weight: bold;
}

.tab-link.active {
    background: #fff;
    border-bottom: 1px solid white;
}

.tab-content {
    display: none;
    border: 1px solid #ccc;
    padding: 20px;
    border-radius: 0 6px 6px 6px;
    background: #fff;
}

.tab-content.active {
    display: block;
}

/* Table Styles */
.stock-take-table-wrapper {
    overflow-x: auto;
}

#stock-take-table,
#location-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
    table-layout: auto;
}

#stock-take-table th,
#location-table th,
#stock-take-table td,
#location-table td {
    padding: 8px 12px;
    border: 1px solid #ccc;
    vertical-align: middle;
}

#stock-take-table th,
#location-table th {
    background: #f8f8f8;
    font-weight: bold;
    position: sticky;
    top: 0;
    z-index: 1;
}

/* Inputs */
#stock-take-table input[type="number"],
#location-table input[type="number"],
#stock-take-table select,
#location-table select {
    width: 100%;
    padding: 4px 6px;
    font-size: 14px;
    border: 1px solid #aaa;
    border-radius: 4px;
    box-sizing: border-box;
}

input[type="text"],
input[type="number"] {
    outline: none;
}

input:focus,
select:focus {
    border-color: #007cba;
    box-shadow: 0 0 0 1px #007cba;
}

/* Buttons */
button,
#bulk-save,
#submit-new-location {
    padding: 6px 12px;
    font-size: 14px;
    background-color: #007cba;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
}

button:hover,
#bulk-save:hover,
#submit-new-location:hover {
    background-color: #005ea5;
}

.save-row {
    background-color: #28a745;
}

.save-row:hover {
    background-color: #218838;
}

/* Toast */
.toast {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 10px 16px;
    border-radius: 4px;
    font-weight: bold;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
    z-index: 9999;
}

/* Add Location */
#add-location-form {
    margin-top: 10px;
    padding: 10px;
    background: #f9f9f9;
    border: 1px dashed #ccc;
    border-radius: 6px;
    display: none;
}

#add-location-form input[type="text"] {
    width: 70%;
    margin-right: 10px;
}

/* Dropdown Styling (match WordPress taxonomy selectors) */
select.postform {
    background: #f8f8f8;
    font-size: 14px;
}

/* Search Box */
#stock-take-search {
    width: 100%;
    padding: 10px;
    font-size: 16px;
    border: 2px solid #007cba;
    border-radius: 4px;
    box-sizing: border-box;
    margin-bottom: 20px;
}

/* Responsive Cleanup */
@media screen and (max-width: 768px) {
    .tab-link {
        display: block;
        margin-bottom: 5px;
    }

    #stock-take-table td,
    #location-table td {
        font-size: 13px;
    }

    #stock-take-search {
        font-size: 14px;
    }
}
