/**
 * Admin CSS for Login as Customer plugin
 */

/* Login as Customer button styling */
.login-as-customer-btn {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    padding: 4px 8px;
    height: auto;
    line-height: 1.4;
    cursor: pointer;
    transition: all 0.2s ease;
}

.login-as-customer-btn .dashicons {
    font-size: 14px;
    width: 14px;
    height: 14px;
}

.login-as-customer-btn:hover {
    background-color: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

.login-as-customer-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Loading state */
.login-as-customer-btn.loading {
    position: relative;
    color: transparent;
}

.login-as-customer-btn.loading::after {
    content: "";
    position: absolute;
    left: 50%;
    top: 50%;
    width: 14px;
    height: 14px;
    margin-left: -7px;
    margin-top: -7px;
    border: 2px solid #2271b1;
    border-right-color: transparent;
    border-radius: 50%;
    animation: login-as-customer-spin 0.6s linear infinite;
}

@keyframes login-as-customer-spin {
    to {
        transform: rotate(360deg);
    }
}

/* Settings page styling */
.login-as-customer-settings-wrap {
    max-width: 800px;
}

.login-as-customer-settings-wrap .form-table th {
    width: 200px;
}

.login-as-customer-settings-wrap .description {
    font-style: italic;
    color: #646970;
}

/* Logs table styling */
.login-as-customer-logs table {
    margin-top: 20px;
}

.login-as-customer-logs td small {
    color: #646970;
}

.login-as-customer-logs .no-logs {
    padding: 20px;
    text-align: center;
    color: #646970;
}

/* Notice styling */
.login-as-customer-notice {
    margin: 15px 0;
    padding: 10px 15px;
    border-left: 4px solid #00a0d2;
    background: #fff;
    box-shadow: 0 1px 1px rgba(0,0,0,0.04);
}

.login-as-customer-notice.error {
    border-left-color: #dc3232;
}

.login-as-customer-notice.success {
    border-left-color: #46b450;
}

/* Admin bar revert button icon */
#wpadminbar .login-as-customer-revert-button .dashicons {
    font-size: 20px;
    vertical-align: middle;
}

/* Frontend logged-in-as-customer banner */
.login-as-customer-frontend-banner {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background: #fff3cd;
    border-top: 3px solid #f56e28;
    padding: 12px 20px;
    z-index: 999999;
    box-shadow: 0 -2px 5px rgba(0,0,0,0.1);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
    font-size: 14px;
    line-height: 1.5;
}

.login-as-customer-frontend-banner .lac-banner-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 10px;
}

.login-as-customer-frontend-banner .lac-banner-info strong {
    color: #856404;
}

.login-as-customer-frontend-banner .lac-banner-info code {
    background: #fff;
    padding: 2px 6px;
    border-radius: 3px;
    margin: 0 5px;
}

.login-as-customer-frontend-banner .lac-banner-original {
    color: #856404;
    font-size: 12px;
}

.login-as-customer-frontend-banner .lac-revert-link {
    background: #f56e28;
    color: #fff;
    padding: 8px 16px;
    border-radius: 4px;
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: background 0.2s;
}

.login-as-customer-frontend-banner .lac-revert-link:hover {
    background: #d85d1f;
    color: #fff;
}

/* Admin notice */
.notice.login-as-customer-notice {
    border-left-color: #f56e28;
}

.login-as-customer-notice .lac-revert-button {
    margin-left: 10px;
}

.login-as-customer-notice .dashicons {
    vertical-align: middle;
}