/**
 * @author    SWM
 * @copyright 2025 SWM
 * @license   https://www.gnu.org/licenses/gpl-2.0.html GNU General Public License v2.0 or later
 */

.packaging-page-title {
    margin-top: 0;
    margin-bottom: 15px;
}

.packaging-info-notice {
    margin-bottom: 20px;
    padding: 12px;
}

.packaging-info-notice p {
    display: flex;
    align-items: center;
}

.packaging-info-icon {
    color: #2271b1;
    margin-right: 8px;
    margin-top: 2px;
    flex-shrink: 0;
}

.packaging-add-button-wrapper {
    margin-bottom: 15px;
    text-align: right;
}

.packaging-flash-message {
    margin-bottom: 20px;
}

.packaging-table thead th {
    background-color: #f0f0f1 !important;
    vertical-align: top;
}

.packaging-table thead th.packaging-col-type {
    width: 100px;
}

.packaging-table thead th.packaging-col-name {
    width: 150px;
    min-width: 150px;
}

.packaging-table thead th.packaging-col-dimension {
    width: 80px;
    text-align: center;
}

.packaging-table thead th.packaging-col-quantity {
    width: 80px;
    text-align: center;
}

.packaging-table thead th.packaging-col-weight {
    width: 90px;
    text-align: center;
}

.packaging-table thead th.packaging-col-cost {
    width: 90px;
    text-align: center;
}

.packaging-table thead th.packaging-col-status {
    width: 100px;
}

.packaging-table thead th.packaging-col-comment {
    width: 200px;
}

.packaging-table thead th.packaging-col-actions {
    width: 100px;
    text-align: right;
}

.packaging-table tbody {
    background-color: #fff;
}

.packaging-table tbody td {
    background-color: #fff;
    vertical-align: top;
    padding-top: 12px;
}

.packaging-table tbody td.packaging-cell-dimension,
.packaging-table tbody td.packaging-cell-quantity,
.packaging-table tbody td.packaging-cell-weight,
.packaging-table tbody td.packaging-cell-cost {
    text-align: center;
}

.packaging-table tbody td.packaging-actions {
    text-align: right;
}

.packaging-table tbody td.packaging-comment {
    font-size: 12px;
    color: #646970;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 200px;
    cursor: help;
}

.packaging-action-icon {
    display: inline-block;
    width: 20px;
    height: 20px;
    text-align: center;
    line-height: 20px;
    text-decoration: none;
    background: transparent;
    color: #2271b1;
    margin-left: 8px;
}

.packaging-action-icon:hover {
    color: #135e96;
}

.packaging-action-icon .dashicons {
    width: 20px;
    height: 20px;
    font-size: 20px;
    line-height: 20px;
}

.packaging-empty-state {
    text-align: center;
    padding: 20px;
    color: #646970;
    background-color: #fff;
}

.packaging-back-link {
    margin-top: 20px;
}

.packaging-back-link a {
    text-decoration: none;
    color: #2271b1;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.packaging-back-link a:hover {
    color: #135e96;
}

.packaging-form-wrapper {
    background: #fff;
    border: 1px solid #ccd0d4;
    box-shadow: 0 1px 1px rgba(0,0,0,.04);
    margin-top: 20px;
}

.packaging-form-header {
    background: #f0f0f1;
    padding: 15px 20px;
    border-bottom: 1px solid #ddd;
}

.packaging-form-header h2 {
    margin: 0 0 5px 0;
    font-size: 18px;
    font-weight: 600;
}

.packaging-form-subtitle {
    margin: 0;
    font-size: 13px;
    color: #646970;
}

.packaging-form-body {
    padding: 30px 40px;
}

.packaging-form-grid-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    margin-bottom: 15px;
}

.packaging-form-grid-cell-left label {
    display: block;
    margin-bottom: 8px;
    font-weight: normal;
}

.packaging-form-grid-cell-left input[type="text"],
.packaging-form-grid-cell-left select {
    width: 100%;
    max-width: 100%;
}

.packaging-form-grid-cell-left input[type="number"] {
    width: 100%;
    max-width: 300px;
}

.packaging-quantity-input {
    max-width: calc((100% - 30px) / 3) !important;
}

.packaging-form-grid-cell-left textarea {
    width: 100%;
    max-width: 100%;
}

.packaging-form-grid-cell-right {
    padding-top: 30px;
}

.packaging-form-row-quantity .packaging-form-grid-cell-right {
    padding-top: 0;
}

.packaging-form-row-weight-cost .packaging-form-grid-cell-right {
    padding-top: 30px;
}

.packaging-weight-cost-descriptions {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.packaging-weight-cost-desc p {
    margin: 0 0 10px 0;
    color: #646970;
    font-size: 13px;
}

.packaging-form-description {
    color: #646970;
    font-size: 13px;
}

.packaging-form-description strong {
    color: #1d2327;
}

.packaging-form-description p {
    margin: 0 0 10px 0;
}

.packaging-dimensions-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.packaging-dimensions-grid input[type="number"] {
    width: 100%;
    max-width: 100%;
}

.packaging-dimension-field label {
    display: block;
    margin-bottom: 5px;
    font-weight: normal;
    font-size: 13px;
}

.packaging-weight-cost-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 15px;
}

.packaging-weight-cost-grid input[type="number"] {
    width: 100%;
    max-width: 100%;
}

.packaging-weight-cost-field label {
    font-size: 12px;
    font-weight: normal;
}

.packaging-cost-warning {
    padding: 10px;
    background: #fff3cd;
    border-left: 3px solid #ffc107;
    color: #856404;
}

.packaging-cost-warning strong {
    color: #856404;
}

.packaging-toggle-label {
    display: block;
    margin-bottom: 8px;
    font-weight: normal;
}

.packaging-toggle-wrapper {
    display: flex;
    gap: 12px;
    line-height: 1;
}

.packaging-toggle-status-text {
    font-size: 14px;
    color: #1d2327;
    min-width: 70px;
    text-align: left;
    line-height: 26px;
}

.packaging-toggle-switch {
    position: relative;
    display: inline-block;
    width: 50px;
    height: 26px;
    flex-shrink: 0;
}

.packaging-toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.packaging-toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.packaging-toggle-slider:before {
    position: absolute;
    content: "";
    height: 18px;
    width: 18px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

.packaging-toggle-switch input:checked + .packaging-toggle-slider {
    background-color: #0073aa;
}

.packaging-toggle-switch input:focus + .packaging-toggle-slider {
    box-shadow: 0 0 1px #0073aa;
}

.packaging-toggle-switch input:checked + .packaging-toggle-slider:before {
    transform: translateX(24px);
}

.packaging-form-buttons {
    text-align: right;
    margin-top: 20px;
}

.packaging-form-buttons .button {
    margin-right: 10px;
}

.packaging-form-buttons .button-primary {
    background: #0073aa;
    border-color: #0073aa;
    color: #fff;
    padding: 6px 20px;
    height: auto;
}

.packaging-form-buttons .button-primary:hover {
    background: #005a87;
    border-color: #005a87;
}

.packaging-form-buttons .button-secondary {
    background: #fff;
    border-color: #ccc;
    color: #555;
    padding: 6px 20px;
    height: auto;
}

.packaging-form-buttons .button-secondary:hover {
    background: #f7f7f7;
    border-color: #999;
}
