/**
 * Tax Free (DIVA/AEAT) — POS Frontend Styles
 *
 * Supplements the existing POS stylesheet (.pos-popup-overlay,
 * .pos-popup-content, etc. are already defined there). Only styles
 * that are specific to the Tax Free feature are added here.
 */

/* -----------------------------------------------------------------------
 * Tax Free toggle button — appended to .pos-action-buttons-row
 * Inherits .ios-btn-icon from the POS stylesheet.
 * ----------------------------------------------------------------------- */
#toggle-taxfree-btn {
    position: relative;
}

#toggle-taxfree-btn.tf-btn-active {
    background: #1976d2;
    color: #fff;
}

/* Badge shown when a traveler is attached */
#toggle-taxfree-btn .tf-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    background: #4caf50;
    color: #fff;
    border-radius: 50%;
    width: 16px;
    height: 16px;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    line-height: 1;
    pointer-events: none;
}

/* -----------------------------------------------------------------------
 * Tax Free modal — inherits .pos-popup-overlay / .pos-popup-content
 * ----------------------------------------------------------------------- */
#taxfree-modal .pos-popup-header {
    background: #1565c0;
}

#taxfree-modal .tf-hint {
    background: #fff8e1;
    border: 1px solid #ffe082;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 0.82em;
    color: #795548;
    margin-top: 4px;
}

#taxfree-modal #tf-validation-error {
    background: #ffebee;
    border: 1px solid #ef9a9a;
    border-radius: 4px;
    padding: 6px 10px;
    font-size: 0.85em;
    margin-top: 6px;
}

#taxfree-modal #tf-reprint-row a {
    color: #1565c0;
    text-decoration: underline;
    cursor: pointer;
}

/* -----------------------------------------------------------------------
 * Toast notification (non-blocking warning for 'pending' DER status)
 * ----------------------------------------------------------------------- */
#tf-toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 99999;
    max-width: 340px;
    padding: 12px 18px;
    border-radius: 6px;
    font-size: 0.9em;
    font-family: inherit;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

#tf-toast.tf-toast-show {
    opacity: 1;
}

#tf-toast.tf-toast-warning {
    background: #ff8f00;
    color: #fff;
}

#tf-toast.tf-toast-error {
    background: #c62828;
    color: #fff;
}

#tf-toast.tf-toast-success {
    background: #2e7d32;
    color: #fff;
}
