/* Analytics Sync Button Styles - Improved Design */
#archm-analytics-sync-container {
    position: absolute;
    top: 50%;
    transform: translateY(-218px);
    right: 39px;
    z-index: 999;
    padding: 16px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    max-width: 600px;
}

.archm-sync-controls {
    display: flex;
    flex-direction: column;
}

.archm-sync-state {
    display: flex;
    opacity: 0;
    animation: fadeIn 0.3s ease forwards;
}

.archm-flex-container {
    display: flex;
    align-items: center;
    gap: 16px;
}

.archm-flex-items {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Button Styles */
.archm-btn {
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    outline: none;
    white-space: nowrap;

    &:focus {
        outline: 2px solid transparent;
        outline-offset: 2px;
        box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.3);
    }

    .archm-icon {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
    }
}

/* Primary Button (Sync) */
.archm-btn-primary {
    background: #2563eb;
    color: #fff;

    &:hover:not(:disabled) {
        background: #1d4ed8;
    }

    &:disabled {
        background: #93c5fd;
        cursor: not-allowed;
    }
}

/* Danger Button (Unsync) */
.archm-btn-danger {
    background: #dc2626;
    color: #fff;

    &:hover:not(:disabled) {
        background: #b91c1c;
    }

    &:focus {
        box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.3);
    }
}

/* Loading Button */
.archm-btn-loading {
    background: #93c5fd;
    color: #fff;
    cursor: not-allowed;

    .archm-spinner {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
        animation: spin 1s linear infinite;
    }

    .archm-spinner-track {
        opacity: 0.25;
    }

    .archm-spinner-path {
        opacity: 0.75;
    }
}

/* Status Text Styles */
.archm-status-text {
    font-size: 14px;
    font-weight: 500;
    display: flex;
    align-items: center;
    line-height: 1.5;
}

.archm-text-gray {
    color: #6b7280;
}

.archm-text-blue {
    color: #2563eb;
}

.archm-text-success {
    color: #16a34a;

    .archm-icon-small {
        width: 20px;
        height: 20px;
        flex-shrink: 0;
    }
}

/* Pulse Dot Animation */
.archm-pulse-dot {
    width: 8px;
    height: 8px;
    background: #2563eb;
    border-radius: 50%;
    animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}

/* Animations */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.5;
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-4px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Responsive adjustments */
@media screen and (max-width: 782px) {
    #archm-analytics-sync-container {
        position: relative;
        top: auto;
        right: auto;
        transform: none;
        margin: 16px 0;
        width: 100%;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
    }

    .archm-flex-container {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .archm-btn {
        width: 100%;
        justify-content: center;
    }

    .archm-status-text {
        font-size: 13px;
    }
}

