
/* ========================================================
   RFID / Основной контейнер
======================================================== */

#rfidApp[v-cloak] {
    display: none;
}

.rfid-card {
    width: 100%;
    margin: 0 auto;

    background: var(--bg-2);

    border: 1px solid var(--border-1);
    border-radius: 20px;

    overflow: hidden;
}

.rfid-card-body {
    position: relative;
    padding: 24px;
}


/* ========================================================
   Заголовок
======================================================== */

.rfid-header {
    display: flex;
    align-items: center;
    gap: 14px;

    margin-bottom: 24px;
}

.rfid-header-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 48px;
    height: 48px;

    flex-shrink: 0;

    border-radius: 14px;

    background: var(--bg-3);
    color: var(--text-1);

    font-size: 22px;
}

.rfid-header-content {
    flex: 1;
    min-width: 0;
}

.rfid-title {
    margin: 0;

    color: var(--text-1);

    font-size: 18px;
    font-weight: 700;
}

.rfid-subtitle {
    margin-top: 3px;

    color: var(--text-3);

    font-size: 14px;
}

.rfid-header-actions {
    display: flex;
    align-items: center;
    gap: 10px;

    flex-shrink: 0;
}

.rfid-count {
    padding: 7px 11px;

    border: 1px solid var(--border-1);
    border-radius: 10px;

    background: var(--bg-1);
    color: var(--text-2);

    font-size: 12px;
    font-weight: 600;

    white-space: nowrap;
}

.rfid-refresh-button {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 36px;
    height: 36px;

    padding: 0;

    border: 1px solid var(--border-1);
    border-radius: 10px;

    background: var(--bg-1);
    color: var(--text-2);

    font-size: 17px;
    cursor: pointer;

    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.rfid-refresh-button:hover:not(:disabled) {
    background: var(--bg-3);
    color: var(--text-1);
}

.rfid-refresh-button:disabled {
    opacity: 0.6;
    cursor: default;
}

.rfid-refresh-button:focus-visible,
.rfid-copy-button:focus-visible {
    outline: 2px solid var(--text-2);
    outline-offset: 3px;
}

.rfid-spin {
    animation: rfid-rotate 1s linear infinite;
}

@keyframes rfid-rotate {
    to {
        transform: rotate(360deg);
    }
}


/* ========================================================
   Ошибка
======================================================== */

.rfid-error {
    display: flex;
    align-items: center;
    gap: 10px;

    margin-bottom: 18px;
    padding: 14px 16px;

    border: 1px solid #f1b5b5;
    border-radius: 14px;

    background: #fff2f2;
    color: #a22d2d;

    font-size: 14px;
}

.rfid-error i {
    flex-shrink: 0;
    font-size: 18px;
}


/* ========================================================
   Загрузка
======================================================== */

.rfid-loading {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;

    min-height: 160px;

    color: var(--text-2);

    font-size: 14px;
}


/* ========================================================
   Список
======================================================== */

.rfid-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.rfid-item {
    display: flex;
    align-items: center;
    gap: 14px;

    padding: 16px;

    background: var(--bg-1);

    border: 1px solid var(--border-1);
    border-radius: 16px;

    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}

.rfid-item:hover {
    background: var(--bg-3);

    box-shadow:
        0 5px 14px rgba(31, 58, 31, 0.06);
}


/* ========================================================
   Иконка карты
======================================================== */

.rfid-item-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 42px;
    height: 42px;

    flex-shrink: 0;

    border-radius: 50%;

    background: var(--bg-3);
    color: var(--text-1);

    font-size: 19px;
}


/* ========================================================
   Информация карты
======================================================== */

.rfid-item-content {
    min-width: 0;
    flex: 1;
}

.rfid-item-title {
    color: var(--text-1);

    font-size: 15px;
    font-weight: 600;
}

.rfid-item-date {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 5px;

    margin-top: 5px;

    color: var(--text-3);

    font-size: 12px;
}

.rfid-item-date > i {
    margin-right: 2px;
}

.rfid-date-dot {
    opacity: 0.65;
}

.rfid-relative-time {
    color: var(--text-2);
    font-weight: 500;
}


/* ========================================================
   RFID-ключ
======================================================== */

.rfid-item-right {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 7px;

    flex-shrink: 0;
}

.rfid-item-key {
    color: var(--text-1);

    font-family: ui-monospace, SFMono-Regular,
        Menlo, Monaco, Consolas, monospace;

    font-size: 15px;
    font-weight: 700;

    letter-spacing: 0.3px;
    overflow-wrap: anywhere;
    text-align: right;
}

.rfid-copy-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    padding: 0;

    border: 0;

    background: transparent;
    color: var(--text-2);

    font-size: 12px;
    font-weight: 600;

    cursor: pointer;

    transition: color 0.2s ease;
}

.rfid-copy-button:hover {
    color: var(--text-1);
}

.rfid-copy-button i {
    font-size: 13px;
}

.rfid-copy-success {
    color: #21804a;
}


/* ========================================================
   Пустой список
======================================================== */

.rfid-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    min-height: 220px;

    text-align: center;
}

.rfid-empty-icon {
    display: flex;
    align-items: center;
    justify-content: center;

    width: 60px;
    height: 60px;

    margin-bottom: 14px;

    border-radius: 18px;

    background: var(--bg-3);
    color: var(--text-2);

    font-size: 26px;
}

.rfid-empty-title {
    color: var(--text-1);

    font-size: 16px;
    font-weight: 700;
}

.rfid-empty-text {
    margin-top: 5px;

    color: var(--text-3);

    font-size: 13px;
}


/* ========================================================
   Мини-уведомление
======================================================== */

.rfid-notification {
    position: fixed;
    right: 24px;
    bottom: 24px;

    z-index: 1055;

    display: flex;
    align-items: center;
    gap: 9px;

    max-width: calc(100vw - 32px);

    padding: 13px 17px;

    border: 1px solid var(--border-1);
    border-radius: 13px;

    background: var(--bg-2);
    color: var(--text-1);

    box-shadow:
        0 10px 35px rgba(0, 0, 0, 0.12);

    font-size: 13px;
    font-weight: 600;
}

.rfid-notification i {
    color: #21804a;
    font-size: 17px;
}

.rfid-notification-error i {
    color: #c43d3d;
}

.rfid-toast-enter-active,
.rfid-toast-leave-active {
    transition:
        opacity 0.2s ease,
        transform 0.2s ease;
}

.rfid-toast-enter-from,
.rfid-toast-leave-to {
    opacity: 0;
    transform: translateY(12px);
}


/* ========================================================
   Адаптив
======================================================== */

@media (max-width: 576px) {

    .rfid-card-body {
        padding: 18px;
    }

    .rfid-header {
        gap: 10px;
        flex-wrap: wrap;
    }

    .rfid-header-icon {
        width: 42px;
        height: 42px;

        font-size: 19px;
    }

    .rfid-title {
        font-size: 17px;
    }

    .rfid-subtitle {
        font-size: 12px;
    }

    .rfid-count {
        padding: 6px 8px;
        font-size: 11px;
    }

    .rfid-item {
        gap: 10px;
        padding: 14px;

        flex-wrap: wrap;
    }

    .rfid-item-icon {
        width: 38px;
        height: 38px;

        font-size: 17px;
    }

    .rfid-item-title {
        font-size: 14px;
    }

    .rfid-item-date {
        gap: 4px;
        font-size: 11px;
    }

    .rfid-item-right {
        width: 100%;
        padding-left: 48px;

        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        gap: 12px;
    }

    .rfid-item-key {
        font-size: 13px;
        text-align: left;
    }

    .rfid-copy-button {
        flex-shrink: 0;
        font-size: 11px;
    }

    .rfid-notification {
        right: 16px;
        bottom: 16px;
    }

}

@media (prefers-reduced-motion: reduce) {

    .rfid-spin {
        animation: none;
    }

    .rfid-toast-enter-active,
    .rfid-toast-leave-active {
        transition: none;
    }

}
