/**
 * Copyright © Asv_ValidateB2B All rights reserved.
 * See COPYING.txt for license details.
 *
 * Styles for the per-contact-address Validate B2B Access / Revoke button
 * and its Alpine.js modal popup.
 */

[x-cloak] {
    display: none !important;
}

.b2b-address-actions {
    margin-top: 10px;
    display: flex;
    flex-wrap: wrap;
    width: 100%;
    gap: 6px;
    align-items: center;
}

.b2b-action-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    border-radius: 4px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, opacity 0.15s ease;
    white-space: nowrap;
    font-size: 12px !important;
    height: 30px;
    padding: 5px 10px !important;
}

.b2b-action-btn:disabled,
.b2b-action-btn[disabled],
.b2b-action-btn[aria-busy="true"] {
    cursor: not-allowed;
    opacity: 0.6;
}

.b2b-action-btn--validate {
    background: #1E194A;
    color: #ffffff;
    border-color: #1E194A;
}

.b2b-action-btn--revoke {
    background: #ffffff;
    color: #DE0021;
    border-color: #DE0021;
}

.b2b-action-btn--revoke:hover:not(:disabled) {
    background: #DE0021;
    color: #ffffff;
}

.b2b-action-btn--grant {
    background: #53B068;
    color: #ffffff;
    border-color: #53B068;
}

.b2b-action-btn--grant:hover:not(:disabled) {
    background: #3f9152;
    border-color: #3f9152;
}

.b2b-action-btn__spinner {
    width: 12px;
    height: 12px;
    border: 2px solid currentColor;
    border-top-color: transparent;
    border-radius: 50%;
    animation: b2b-action-btn-spin 0.7s linear infinite;
}

@keyframes b2b-action-btn-spin {
    to {
        transform: rotate(360deg);
    }
}

/* ------- Modal ----------------------------------------------------------- */

.b2b-modal {
    position: fixed;
    inset: 0;
    z-index: 10010;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(20, 20, 30, 0.55);
    padding: 16px;
}

.b2b-modal__body {
    font-size: 14px;
    line-height: 1.5;
}

.b2b-modal__footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
}
