/* POD-specific screen classes (delivery flow). Loaded after pod-shell.css.
   pod-shell.css stays a 1:1 copy of WbAClient wba-shell.css; anything POD-only lives here.
   Tokens only (aiden-tokens.css); no hardcoded colours. */

/* ---- List cards: layout inside .wba-task-card (selection/urgent come from pod-shell.css) ---- */
/* No column-gap: optional columns (urgent icon) collapse to zero width without leaving a gap.
   Spacing sits on the cells instead. */
.pod-card {
    display: grid;
    row-gap: 0.1rem;
    align-items: center;
    min-width: 0;
}

.pod-card > * {
    min-width: 0;
    overflow-wrap: anywhere;
}

.pod-card__urgent {
    grid-area: urgent;
    margin-right: var(--aiden-space-1, 4px);
}

.pod-card__type {
    grid-area: type;
    margin-right: var(--aiden-space-2, 8px);
}

.pod-card__status,
.pod-card__date,
.pod-card__qty,
.pod-card__size,
.pod-card__attach {
    margin-left: var(--aiden-space-2, 8px);
}

.pod-card__code {
    grid-area: code;
}

.pod-card__name {
    grid-area: name;
}

.pod-card__user {
    grid-area: user;
}

.pod-card__status {
    grid-area: status;
    justify-self: end;
}

.pod-card__date {
    grid-area: date;
    justify-self: end;
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
}

.pod-card__qty {
    grid-area: qty;
    justify-self: end;
    text-align: right;
    font-variant-numeric: tabular-nums;
}

.pod-card__city {
    grid-area: city;
}

.pod-card__attach {
    grid-area: attach;
    align-self: start;
    justify-self: end;
}

.pod-card__line1 {
    grid-area: line1;
}

.pod-card__line2 {
    grid-area: line2;
}

.pod-card__file {
    grid-area: file;
}

.pod-card__desc {
    grid-area: desc;
}

.pod-card__size {
    grid-area: size;
    justify-self: end;
    text-align: right;
    white-space: nowrap;
}

/* RoutesScreen: route id + status / user + date */
.pod-route-card {
    grid-template-columns: auto minmax(0, 1fr) auto;
    grid-template-areas:
        "urgent code status"
        "user   user date";
}

/* RouteDeliveriesScreen, DeliveryTaskScreen: type + doc + status / customer + date / city */
.pod-task-card {
    grid-template-columns: auto auto minmax(0, 1fr) auto;
    grid-template-areas:
        "urgent type code status"
        "name   name name date"
        "city   city city city";
    min-height: 46px;
}

/* ConfirmItemsScreen: item + quantity / name + status / extra lines; optional attachment column */
.pod-line-card {
    grid-template-columns: minmax(0, 1fr) minmax(50px, 150px);
    grid-template-areas:
        "code  qty"
        "name  status"
        "line1 line1"
        "line2 line2";
}

.pod-line-card--attachment {
    grid-template-columns: minmax(0, 1fr) minmax(50px, 150px) minmax(6px, 30px);
    grid-template-areas:
        "code  qty    attach"
        "name  status attach"
        "line1 line1  line1"
        "line2 line2  line2";
}

/* AttachmentsScreen: file name / description + size */
.pod-attachment-card {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
        "file file"
        "desc size";
    min-height: 46px;
}

/* ---- Notices (MessageScreen = info, ErrorScreen = error) ----
   DS notice on top of the WMS content card: icon + left accent + light tint.
   The level is also clear without colour (different icon, role status/alert). */
.wba-page-content > .mud-grid > .mud-grid-item.pod-notice-item {
    min-height: 0;
}

.wba-content-card.pod-notice {
    flex-direction: row;
    align-items: stretch;
}

.pod-notice__icon {
    flex: 0 0 auto;
    margin: 0.85rem 0 0 0.85rem;
}

.wba-content-card.pod-notice--info {
    border-color: color-mix(in srgb, var(--aiden-color-status-info, #3C5279) 45%, var(--int-line, #D3DAE1)) !important;
    background: color-mix(in srgb, var(--aiden-color-status-info, #3C5279) 6%, var(--int-surface, #fff)) !important;
    box-shadow: inset 0.25rem 0 0 var(--aiden-color-status-info, #3C5279), var(--aiden-elevation-resting) !important;
}

.wba-content-card.pod-notice--error {
    background: color-mix(in srgb, var(--aiden-color-status-danger, #B42318) 6%, var(--int-surface, #fff)) !important;
}

/* ---- Option list (RejectionReasonScreen) ---- */
.pod-option-item {
    border: 1px solid var(--int-line, #D3DAE1);
    border-radius: var(--aiden-radius-md, 8px);
    background: var(--int-surface, #fff);
}

.pod-option-item.is-selected {
    border-color: var(--aiden-royal, #3C5279);
    box-shadow: inset 0.25rem 0 0 var(--aiden-limelight, #BFD730);
    background: color-mix(in srgb, var(--aiden-limelight) 12%, var(--int-surface, #fff));
}

/* ---- Full-width action buttons (InRouteScreen) ---- */
.pod-action-btn {
    min-width: 200px;
}

/* ---- Detail screens (DetailScreen, RemarksDetailScreen) ---- */
.pod-detail-stack {
    height: calc(100vh - 240px);
}

.pod-detail-body {
    overflow: auto;
    height: 100%;
}

/* ---- Attachment preview (AttachmentScreen) ---- */
.pod-attachment-preview {
    max-height: calc(100vh - 330px);
    overflow: auto;
    border: 1px solid var(--int-line, #D3DAE1);
    border-radius: var(--aiden-radius-md, 8px);
}

.pod-attachment-preview__image {
    width: 100%;
    display: block;
}

/* ---- Signature dialog: sizes unchanged (signaturepad.js reads offsetWidth/offsetHeight) ---- */
.pod-signature-canvas {
    margin-top: 0 !important;
    min-width: 250px;
    width: 100%;
    max-width: 300px;
    min-height: 250px;
    height: 100%;
    max-height: 300px;
    border: 1px solid var(--int-line, #D3DAE1);
    border-radius: var(--aiden-radius-md, 8px);
    background: var(--int-surface, #fff);
    touch-action: none;
}

.pod-signature-recipient {
    width: 100%;
    max-width: 300px;
}
