/* =========================================================
   Public Portal — Floating Toast Notification
   Used ONLY on public complaint pages. Isolated from the
   internal admin/master alert system.
   ========================================================= */

.pd-toast {
    position: fixed;
    top: 24px;
    right: 24px;
    width: 400px;
    max-width: calc(100vw - 32px);
    z-index: 9999;
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 16px 40px 0 16px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.22);
    color: #ffffff;
    font-family: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
    overflow: hidden;

    opacity: 0;
    transform: translateX(120%);
    transition: transform 0.35s ease, opacity 0.35s ease;
}

.pd-toast.pd-toast-visible {
    opacity: 1;
    transform: translateX(0);
}

.pd-toast.pd-toast-hiding {
    opacity: 0;
    transform: translateX(30px);
}

.pd-toast-success {
    background-color: rgba(22, 163, 74, 0.96);
}

.pd-toast-error {
    background-color: rgba(220, 38, 38, 0.96);
}

.pd-toast-icon {
    flex-shrink: 0;
    width: 30px;
    height: 30px;
    border-radius: 50%;
    background-color: rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 2px;
}

.pd-toast-icon .pd-icon {
    width: 17px;
    height: 17px;
}

.pd-toast-body {
    flex: 1;
    min-width: 0;
    padding-bottom: 16px;
}

.pd-toast-title {
    font-size: 14.5px;
    font-weight: 700;
    margin: 0 0 8px 0;
}

.pd-toast-line {
    font-size: 12px;
    margin: 0 0 2px 0;
    line-height: 1.4;
    opacity: 0.9;
    text-transform: uppercase;
    letter-spacing: 0.4px;
    font-weight: 600;
}

.pd-toast-complaint-no {
    font-size: 19px;
    font-weight: 800;
    letter-spacing: 0.3px;
    margin: 0 0 8px 0;
    line-height: 1.3;
}

.pd-toast-note {
    font-size: 12px;
    margin: 0;
    line-height: 1.4;
    opacity: 0.92;
}

.pd-toast-close {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    border: none;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 6px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
}

.pd-toast-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

.pd-toast-close .pd-icon {
    width: 14px;
    height: 14px;
}

/* ---------------- Progress Bar ---------------- */

.pd-toast-progress-track {
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 4px;
    background-color: rgba(255, 255, 255, 0.25);
}

.pd-toast-progress-bar {
    height: 100%;
    width: 100%;
    background-color: rgba(255, 255, 255, 0.9);
    transform-origin: left;
    transition: transform linear;
}

/* ---------------- Responsive ---------------- */

@media (max-width: 480px) {
    .pd-toast {
        top: 16px;
        right: 16px;
        left: 16px;
        width: auto;
        max-width: none;
    }
}

/* ---------------- Complaint Number + Copy Button ---------------- */

.pd-toast-complaint-row {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 6px;
}

.pd-toast-complaint-row .pd-toast-complaint-no {
    margin: 0;
}

.pd-toast-copy-btn {
    flex-shrink: 0;
    width: 26px;
    height: 26px;
    border: none;
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 6px;
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    padding: 0;
    transition: background-color 0.15s ease, transform 0.1s ease;
}

.pd-toast-copy-btn:hover {
    background-color: rgba(255, 255, 255, 0.32);
}

.pd-toast-copy-btn:active {
    transform: scale(0.92);
}

.pd-toast-copy-btn .pd-icon {
    width: 14px;
    height: 14px;
}

.pd-toast-copied-msg {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    font-weight: 600;
    margin: 0 0 8px 0;
    color: #ffffff;
    opacity: 0;
    max-height: 0;
    overflow: hidden;
    transition: opacity 0.2s ease, max-height 0.2s ease;
}

.pd-toast-copied-msg.pd-toast-copied-visible {
    opacity: 1;
    max-height: 20px;
}

.pd-toast-copied-msg .pd-icon {
    width: 13px;
    height: 13px;
    flex-shrink: 0;
}