/* assets/css/admin.css */

/* Приховуємо блок add-items */
.add-items {
    display: none !important;
}

/* Базова зона плагіна в адмінці */
.abankpay-admin {
    margin-top: 10px;
    font-family: inherit;
}

/* Кнопки плагіна */
.abankpay-btn,
button.abankpay-btn,
a.abankpay-btn {
    display: inline-block;
    padding: 6px 10px;
    border-radius: 4px;
    font-size: 13px;
    line-height: 1;
    text-decoration: none;
    cursor: pointer;
    border: 1px solid rgba(0,0,0,0.08);
    background: #f7f7f7;
    color: #333;
    margin-right: 6px;
}

/* Спеціальна кнопка мета-боксу (вдало виділяти серед WP кнопок) */
.abankpay-check-status {
    /* не перезаписуємо WP .button, лише додаємо невелике відступ */
    margin-top: 6px;
}

/* Праймерні/небезпечні класи */
.abankpay-btn.primary {
    background: #0073aa;
    color: #fff;
    border-color: rgba(0,0,0,0.05);
}
.abankpay-btn.danger {
    background: #a00;
    color: #fff;
    border-color: rgba(0,0,0,0.05);
}

/* Лоадер (спінер) */
.abankpay-loader {
    display: inline-block;
    width: 14px;
    height: 14px;
    vertical-align: middle;
    border: 2px solid rgba(255,255,255,0.15);
    border-top-color: rgba(0,0,0,0.35);
    border-radius: 50%;
    -webkit-animation: abankpay-spin 0.7s linear infinite;
    animation: abankpay-spin 0.7s linear infinite;
    margin-right: 6px;
}

@-webkit-keyframes abankpay-spin {
    0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
    100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}
@keyframes abankpay-spin {
    0% { -webkit-transform: rotate(0deg); transform: rotate(0deg); }
    100% { -webkit-transform: rotate(360deg); transform: rotate(360deg); }
}

/* Стилі для статусу/рядка */
.abankpay-status {
    font-weight: 600;
    margin-left: 6px;
}

/* Нотифікації плагіна, створені JS (або як fallback) */
.abankpay-notice {
    border-left-width: 4px;
    margin: 12px 0;
    padding: 10px 14px;
}

/* Також підтримка notice, яку виводить PHP (класи WP: notice notice-success/error) */
.a-pay-notice,
.notice.a-pay-notice {
    margin: 12px 0;
}

/* Маленька форма/поле для суми повернення */
.abankpay-refund-amount {
    width: 90px;
    padding: 4px 6px;
    border: 1px solid #ddd;
    border-radius: 3px;
}

/* Адаптація таблиць */
.abankpay-admin table.abankpay-table {
    width: 100%;
    border-collapse: collapse;
}
.abankpay-admin table.abankpay-table th,
.abankpay-admin table.abankpay-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #eee;
    vertical-align: middle;
}

/* Модалка (overlay) — контейнер, wrap, контент */
.a-pay-modal {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none; /* JS показує/ховає */
    z-index: 100000;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.a-pay-modal .a-pay-modal-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
}

.a-pay-modal-content {
    background: #fff;
    padding: 25px;
    border-radius: 10px;
    max-width: 520px;
    width: 100%;
    text-align: center;
    box-shadow: 0 4px 40px rgba(0, 0, 0, 0.35);
    animation: abankpay-fadeInUp 0.28s ease-out;
}

/* Кнопки в модалці */
.a-pay-modal-buttons {
    margin-top: 20px;
    display: flex;
    justify-content: center;
    gap: 12px;
    flex-wrap: wrap;
}

/* Підсвічування нотатки */
.a-pay-highlight {
    background: #e6f9e6 !important;
    border-left: 4px solid #2ecc71 !important;
    padding: 6px 10px;
    border-radius: 4px;
}

/* Анімація модалки */
@keyframes abankpay-fadeInUp {
    from {
        opacity: 0;
        transform: translateY(18px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Дрібні медіа: зменшуємо padding у вузьких екранах */
@media (max-width: 780px) {
    .abankpay-btn { padding: 5px 8px; font-size: 12px; }
    .abankpay-refund-amount { width: 70px; }
    .a-pay-modal-content { padding: 18px; }
}
